File tree Expand file tree Collapse file tree 7 files changed +59
-8
lines changed Expand file tree Collapse file tree 7 files changed +59
-8
lines changed Original file line number Diff line number Diff line change
1
+ name : Build And Publish Docker Images
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ paths :
8
+ - docker/**
9
+ release :
10
+ types : [published]
11
+ pull_request :
12
+ paths :
13
+ - docker/**
14
+
15
+ jobs :
16
+ build-publish :
17
+ name : Build and Push Docker images to Docker Hub
18
+ runs-on : ubuntu-latest
19
+
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ - name : Build all Horovod flavoured PyTorch-Ignite images
23
+ working-directory : ./docker
24
+ run : |
25
+ chmod +x ./hvd/build_all.sh
26
+ ./hvd/build_all.sh
27
+
28
+ - name : Build all PyTorch-Ignite images
29
+ working-directory : ./docker
30
+ run : |
31
+ chmod +x ./main/build_all.sh
32
+ ./main/build_all.sh
33
+ - name : Build all MS DeepSpeed flavoured PyTorch-Ignite images
34
+ working-directory : ./docker
35
+ run : |
36
+ chmod +x ./msdp/build_all.sh
37
+ ./msdp/build_all.sh
38
+
39
+ - name : List built images
40
+ working-directory : ./docker
41
+ run : docker images | grep pytorchignite
42
+
43
+ - name : Push all PyTorch-Ignite Docker images
44
+ if : github.event_name == 'push'
45
+ env :
46
+ DOCKER_USER : ${{ secrets.DOCKER_USER }}
47
+ DOCKER_TOKEN : ${{ secrets.DOCKER_TOKEN }}
48
+ working-directory : ./docker
49
+ run : |
50
+ chmod +x ./push_all.sh
51
+ ./push_all.sh
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ RUN echo "Setup NVIDIA Apex" && \
18
18
19
19
# Build Horovod
20
20
RUN apt-get update && apt-get install -y git && \
21
- git clone --recursive --depth 1 --branch v0.20.0 https://github.com/horovod/horovod.git /horovod && \
21
+ git clone --recursive --depth 1 --branch v0.20.3 https://github.com/horovod/horovod.git /horovod && \
22
22
conda install -y cmake=3.16 nccl=2.7 -c conda-forge && \
23
23
cd /horovod && \
24
24
HOROVOD_GPU_OPERATIONS=NCCL HOROVOD_NCCL_LINK=SHARED HOROVOD_WITHOUT_MPI=1 HOROVOD_WITH_PYTORCH=1 pip wheel --no-cache-dir . && \
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ LABEL description="Latest PyTorch, Ignite and Horovod"
6
6
7
7
# Build Horovod
8
8
RUN apt-get update && apt-get install -y git && \
9
- git clone --recursive --depth 1 --branch v0.20.0 https://github.com/horovod/horovod.git /horovod && \
9
+ git clone --recursive --depth 1 --branch v0.20.3 https://github.com/horovod/horovod.git /horovod && \
10
10
conda install -y cmake=3.16 nccl=2.7 -c conda-forge && \
11
11
cd /horovod && \
12
12
HOROVOD_GPU_OPERATIONS=NCCL HOROVOD_NCCL_LINK=SHARED HOROVOD_WITHOUT_MPI=1 HOROVOD_WITH_PYTORCH=1 pip wheel --no-cache-dir . && \
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ set -xeu
17
17
image_name=" hvd-base"
18
18
19
19
docker build -t pytorchignite/${image_name} :latest -f Dockerfile.${image_name} .
20
- image_tag=` docker run --rm -it pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
20
+ image_tag=` docker run --rm -i pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
21
21
docker tag pytorchignite/${image_name} :latest pytorchignite/${image_name} :${image_tag}
22
22
23
23
for image_name in " hvd-vision" " hvd-nlp" " hvd-apex" " hvd-apex-vision" " hvd-apex-nlp"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ set -xeu
17
17
image_name=" base"
18
18
19
19
docker build -t pytorchignite/${image_name} :latest -f Dockerfile.${image_name} .
20
- image_tag=` docker run --rm -it pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
20
+ image_tag=` docker run --rm -i pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
21
21
docker tag pytorchignite/${image_name} :latest pytorchignite/${image_name} :${image_tag}
22
22
23
23
for image_name in " vision" " nlp" " apex" " apex-vision" " apex-nlp"
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ set -xeu
17
17
image_name=" msdp-apex-base"
18
18
19
19
docker build -t pytorchignite/${image_name} :latest -f Dockerfile.${image_name} .
20
- image_tag=` docker run --rm -it pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
20
+ image_tag=` docker run --rm -i pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
21
21
docker tag pytorchignite/${image_name} :latest pytorchignite/${image_name} :${image_tag}
22
22
23
23
for image_name in " msdp-apex-vision" " msdp-apex-nlp"
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ echo $DOCKER_TOKEN | docker login --username=$DOCKER_USER --password-stdin
21
21
set -xeu
22
22
23
23
image_name=" base"
24
- image_tag=` docker run --rm -it pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
24
+ image_tag=` docker run --rm -i pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
25
25
26
26
for image_name in " base" " vision" " nlp" " apex" " apex-vision" " apex-nlp"
27
27
do
33
33
34
34
35
35
image_name=" hvd-base"
36
- image_tag=` docker run --rm -it pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
36
+ image_tag=` docker run --rm -i pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
37
37
38
38
for image_name in " hvd-base" " hvd-vision" " hvd-nlp" " hvd-apex" " hvd-apex-vision" " hvd-apex-nlp"
39
39
do
44
44
done
45
45
46
46
image_name=" msdp-apex-base"
47
- image_tag=` docker run --rm -it pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
47
+ image_tag=` docker run --rm -i pytorchignite/${image_name} :latest -c ' python -c "import torch; import ignite; print(torch.__version__ + \"-\" + ignite.__version__, end=\"\")"' `
48
48
49
49
for image_name in " msdp-apex-base" " msdp-apex-vision" " msdp-apex-nlp"
50
50
do
You can’t perform that action at this time.
0 commit comments