Skip to content

Commit

Permalink
Adds climate-notebook-gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Mar 9, 2024
1 parent b0592b1 commit 1acc458
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,43 @@ jobs:
push: true
tags: ghcr.io/esgf-nimbus/climate-notebook:${{ steps.get-version.outputs.version }}
build-args: "${{ steps.get-version.outputs.build-args }}"

build-climate-notebook-gpu:
needs:
- get-issue-number
- build-climate-notebook
runs-on: ubuntu-latest
name: Build climate-notebook-gpu
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- id: get-version
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
VERSION=pr-${{ needs.get-issue-number.outputs.pr-number }}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "build-args=TAG=$VERSION" >> $GITHUB_OUTPUT
else
pip install tbump
pushd dockerfiles/climate-notebook-gpu
echo "version=$(tbump current-version)" >> $GITHUB_OUTPUT
echo "build-args=" >> $GITHUB_OUTPUT
fi
- uses: docker/build-push-action@v5
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: dockerfiles/climate-notebook-gpu
push: true
tags: ghcr.io/esgf-nimbus/climate-notebook-gpu:${{ steps.get-version.outputs.version }}
build-args: "${{ steps.get-version.outputs.build-args }}"
2 changes: 1 addition & 1 deletion dockerfiles/climate-notebook-gpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG TAG=0.1.0
ARG IMAGE=ghcr.io/esgf-nimbus/llnl-notebook
ARG IMAGE=ghcr.io/esgf-nimbus/climate-notebook
FROM ${IMAGE}:${TAG}

USER root
Expand Down

0 comments on commit 1acc458

Please sign in to comment.