forked from mosaicml/composer
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (61 loc) · 2.01 KB
/
release-docker.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release Docker Images
on:
workflow_dispatch:
workflow_call:
secrets:
DOCKER_HUB_USERNAME:
required: true
DOCKER_HUB_PASSWORD:
required: true
defaults:
run:
working-directory: .
jobs:
build-image-matrix:
if: github.repository_owner == 'mosaicml'
runs-on: ubuntu-latest
timeout-minutes: 2
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/setup-python@v4
with:
python-version: 3.9
- uses: actions/checkout@v3
- id: set-matrix
run: |
# Install yaml dependency
pip install pyyaml
# Generate build matrix
BUILD_MATRIX=$(python .github/bin/gen_docker_matrix.py docker/build_matrix.yaml)
echo $BUILD_MATRIX >> $GITHUB_OUTPUT
stage-docker-build:
needs: build-image-matrix
uses: ./.github/workflows/docker-configure-build-push.yaml
strategy:
fail-fast: true
matrix: ${{ fromJSON(needs.build-image-matrix.outputs.matrix) }}
name: ${{ matrix.IMAGE_NAME }}
with:
build-args: |
AWS_OFI_NCCL_VERSION=${{ matrix.AWS_OFI_NCCL_VERSION }}
BASE_IMAGE=${{ matrix.BASE_IMAGE }}
CUDA_VERSION=${{ matrix.CUDA_VERSION }}
MOFED_VERSION=${{ matrix.MOFED_VERSION }}
PYTHON_VERSION=${{ matrix.PYTHON_VERSION }}
PYTORCH_VERSION=${{ matrix.PYTORCH_VERSION }}
TORCHTEXT_VERSION=${{ matrix.TORCHTEXT_VERSION }}
TORCHVISION_VERSION=${{ matrix.TORCHVISION_VERSION }}
PYTORCH_NIGHTLY_URL=${{ matrix.PYTORCH_NIGHTLY_URL }}
PYTORCH_NIGHTLY_VERSION=${{ matrix.PYTORCH_NIGHTLY_VERSION }}
NVIDIA_REQUIRE_CUDA_OVERRIDE=${{ matrix.NVIDIA_REQUIRE_CUDA_OVERRIDE }}
context: ./docker
image-name: ${{ matrix.IMAGE_NAME }}
image-uuid: ${{ matrix.UUID }}
push: true
staging: false
tags: ${{ matrix.TAGS }}
target: ${{ matrix.TARGET }}
secrets:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}