From f103efdc5672dece6408a3bdf31904804e63313d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 5 Oct 2023 21:40:38 +0200 Subject: [PATCH] Add steps for CUDA 12 image (#2255) --- .github/workflows/deploy.yml | 9 ++++++--- docker/build_and_push.sh | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3a8bf5ba6..5350e1e45 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -108,6 +108,9 @@ jobs: # The assets job may push new commit, so we wait for it needs: [assets] runs-on: ubuntu-latest + strategy: + matrix: + cuda: ["11.8", "12.2"] steps: - uses: actions/checkout@v3 - run: | @@ -132,8 +135,8 @@ jobs: flavor: | latest=false tags: | - type=semver,pattern={{version}}-cuda11.8 - type=raw,value=latest-cuda11.8 + type=semver,pattern={{version}}-cuda${{ matrix.cuda }} + type=raw,value=latest-cuda${{ matrix.cuda }} - name: Build and push uses: docker/build-push-action@v2 with: @@ -142,7 +145,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} build-args: | - BASE_IMAGE=ghcr.io/livebook-dev/utils:elixir-${{ env.elixir }}-erlang-${{ env.otp }}-cuda11.8 + BASE_IMAGE=ghcr.io/livebook-dev/utils:elixir-${{ env.elixir }}-erlang-${{ env.otp }}-cuda${{ matrix.cuda }} create_draft_release: if: github.ref_type == 'tag' diff --git a/docker/build_and_push.sh b/docker/build_and_push.sh index e42f14449..297e151b9 100755 --- a/docker/build_and_push.sh +++ b/docker/build_and_push.sh @@ -15,3 +15,12 @@ docker buildx build --push --platform linux/amd64,linux/arm64 \ --build-arg CUDA_VERSION=11.8.0 \ -f docker/base/elixir-cuda.dockerfile \ docker/base + +docker buildx build --push --platform linux/amd64,linux/arm64 \ + -t ghcr.io/livebook-dev/utils:elixir-$elixir-erlang-$otp-cuda12.2 \ + --build-arg ELIXIR_VERSION=$elixir \ + --build-arg ERLANG_VERSION=$otp \ + --build-arg UBUNTU_VERSION=$ubuntu \ + --build-arg CUDA_VERSION=12.2.0 \ + -f docker/base/elixir-cuda.dockerfile \ + docker/base