Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Nov 18, 2024
1 parent d178a74 commit ab6cc02
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
image: ["python:3.10-slim", "nvidia/cuda:12.4.0-base-ubuntu22.04"]
image: ["ubuntu:24.04", "nvidia/cuda:12.6.2-base-ubuntu24.04"]
# Must match version at https://www.python.org/ftp/python/
python: [3.10.13]

Expand All @@ -43,7 +43,7 @@ jobs:

- name: Sanitize docker tag
run:
PREFIX_DOCKER_TAG="OnnxTR-${{ matrix.image == 'nvidia/cuda:12.4.0-base-ubuntu22.04' && 'gpu' || 'cpu' }}-py${{ matrix.python }}-"
PREFIX_DOCKER_TAG="OnnxTR-${{ matrix.image == 'nvidia/cuda:12.6.2-base-ubuntu24.04' && 'gpu' || 'cpu' }}-py${{ matrix.python }}-"
PREFIX_DOCKER_TAG=$(echo PREFIX_DOCKER_TAG|sed 's/,/-/g')
echo PREFIX_DOCKER_TAG=${PREFIX_DOCKER_TAG} >> $GITHUB_ENV

Expand All @@ -63,10 +63,11 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
# Set SYSTEM to 'gpu' if the image is nvidia/cuda:12.4.0-base-ubuntu22.04 and 'cpu' otherwise
# Set SYSTEM to 'gpu-headless' if the image is nvidia/cuda:12.6.2-base-ubuntu24.04
# and 'cpu-headless' otherwise
build-args: |
BASE_IMAGE=${{ matrix.image }}
SYSTEM=${{ matrix.image == 'nvidia/cuda:12.4.0-base-ubuntu22.04' && 'gpu' || 'cpu' }}
SYSTEM=${{ matrix.image == 'nvidia/cuda:12.4.0-base-ubuntu22.04' && 'gpu-headless' || 'cpu-headless' }}
PYTHON_VERSION=${{ matrix.python }}
ONNXTR_REPO=${{ github.repository }}
ONNXTR_VERSION=${{ github.sha }}
Expand All @@ -82,10 +83,11 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
# Set SYSTEM to 'gpu' if the image is nvidia/cuda:12.4.0-base-ubuntu22.04 and 'cpu' otherwise
# Set SYSTEM to 'gpu-headless' if the image is nvidia/cuda:12.6.2-base-ubuntu24.04
# and 'cpu-headless' otherwise
build-args: |
BASE_IMAGE=${{ matrix.image }}
SYSTEM=${{ matrix.image == 'nvidia/cuda:12.4.0-base-ubuntu22.04' && 'gpu' || 'cpu' }}
SYSTEM=${{ matrix.image == 'nvidia/cuda:12.4.0-base-ubuntu22.04' && 'gpu-headless' || 'cpu-headless' }}
PYTHON_VERSION=${{ matrix.python }}
ONNXTR_REPO=${{ github.repository }}
ONNXTR_VERSION=${{ github.sha }}
Expand Down

0 comments on commit ab6cc02

Please sign in to comment.