Skip to content

Commit 70570f9

Browse files
carmoccaBorda
andauthored
Minimize the number of docker jobs (#10202)
Co-authored-by: Jirka Borovec <[email protected]>
1 parent 762af95 commit 70570f9

File tree

8 files changed

+30
-41
lines changed

8 files changed

+30
-41
lines changed

.github/workflows/ci_dockers.yml

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
python_version: ["3.8"]
27-
pytorch_version: ["1.6", "1.8"]
26+
# should be the config used in '.github/workflows/release-docker.yml', but we just keep one to check.
27+
python_version: ["3.9"]
28+
pytorch_version: ["1.9"]
2829
steps:
2930
- name: Checkout
3031
uses: actions/checkout@v2
@@ -45,8 +46,9 @@ jobs:
4546
strategy:
4647
fail-fast: false
4748
matrix:
49+
# the config used in '.circleci/config.yml`'
4850
python_version: ["3.7"]
49-
xla_version: ["1.6", "1.8", "1.10"]
51+
xla_version: ["1.8"]
5052
steps:
5153
- name: Checkout
5254
uses: actions/checkout@v2
@@ -67,24 +69,19 @@ jobs:
6769
strategy:
6870
fail-fast: false
6971
matrix:
70-
include:
71-
# todo: see notes in Dockerfile
72-
- python_version: "3.7"
73-
pytorch_version: "1.6"
74-
- python_version: "3.9"
75-
pytorch_version: "1.9"
72+
# the config used in '.azure-pipelines/gpu-tests.yml'
73+
python_version: ["3.7"]
74+
pytorch_version: ["1.8"]
7675
steps:
7776
- name: Checkout
7877
uses: actions/checkout@v2
79-
8078
- name: Build CUDA Docker
8179
# publish master/release
8280
uses: docker/build-push-action@v2
8381
with:
8482
build-args: |
8583
PYTHON_VERSION=${{ matrix.python_version }}
8684
PYTORCH_VERSION=${{ matrix.pytorch_version }}
87-
CUDA_VERSION=10.2
8885
file: dockers/base-cuda/Dockerfile
8986
push: false
9087
timeout-minutes: 75
@@ -94,24 +91,17 @@ jobs:
9491
strategy:
9592
fail-fast: false
9693
matrix:
97-
include:
98-
- python_version: "3.7"
99-
pytorch_version: "1.6"
100-
- python_version: "3.8"
101-
pytorch_version: "1.9"
102-
- python_version: "3.9"
103-
pytorch_version: "1.10"
94+
# the config used in '.github/workflows/ci_test-conda.yml'
95+
python_version: ["3.7"]
96+
pytorch_version: ["1.6", "1.7", "1.8", "1.9", "1.10"]
10497
steps:
10598
- name: Checkout
10699
uses: actions/checkout@v2
107-
108-
# see: https://pytorch.org/get-started/previous-versions/
109100
- run: |
110101
cuda=$(python -c "from distutils.version import LooseVersion as LVer ; print(11.1 if LVer('${{matrix.pytorch_version}}') > LVer('1.7') else 10.2)" 2>&1)
111102
echo "::set-output name=CUDA::$cuda"
112103
id: extend
113-
114-
- name: Build CUDA Docker
104+
- name: Build Conda Docker
115105
# publish master/release
116106
uses: docker/build-push-action@v2
117107
with:
@@ -128,9 +118,11 @@ jobs:
128118
strategy:
129119
fail-fast: false
130120
matrix:
131-
include:
132-
- python_version: "3.8"
133-
pytorch_version: "1.7"
121+
# the config used in 'dockers/ipu-ci-runner/Dockerfile'
122+
python_version: ["3.8"] # latest
123+
# TODO: upgrade - PopTorch 2.2 uses torch 1.9, see:
124+
# https://docs.graphcore.ai/projects/poptorch-user-guide/en/latest/installation.html#version-compatibility
125+
pytorch_version: ["1.7"]
134126
steps:
135127
- name: Checkout
136128
uses: actions/checkout@v2

.github/workflows/ci_test-conda.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
# os: [ubuntu-20.04]
1817
python-version: ["3.7"]
1918
pytorch-version: ["1.6", "1.7", "1.8", "1.9", "1.10"]
2019

.github/workflows/events-nightly.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ jobs:
5353
strategy:
5454
fail-fast: false
5555
matrix:
56+
# the config used in '.circleci/config.yml`'
5657
python_version: ["3.7"]
57-
xla_version: ["1.6", "1.7", "1.8", "1.9"]
58+
xla_version: ["1.8"]
5859

5960
steps:
6061
- name: Checkout
@@ -87,11 +88,9 @@ jobs:
8788
strategy:
8889
fail-fast: false
8990
matrix:
90-
python_version: ["3.6", "3.7", "3.8", "3.9"]
91-
pytorch_version: ["1.6", "1.7", "1.8", "1.9"]
92-
exclude:
93-
- python_version: "3.9"
94-
pytorch_version: "1.6"
91+
# the config used in '.azure-pipelines/gpu-tests.yml'
92+
python_version: ["3.7"]
93+
pytorch_version: ["1.8"]
9594

9695
steps:
9796
- name: Checkout
@@ -122,11 +121,9 @@ jobs:
122121
strategy:
123122
fail-fast: false
124123
matrix:
125-
python_version: ["3.6", "3.7", "3.8", "3.9"]
124+
# the config used in '.github/workflows/ci_test-conda.yml'
125+
python_version: ["3.7"]
126126
pytorch_version: ["1.6", "1.7", "1.8", "1.9", "1.10"]
127-
exclude:
128-
- python_version: "3.9"
129-
pytorch_version: "1.6"
130127

131128
steps:
132129
- name: Checkout
@@ -164,6 +161,7 @@ jobs:
164161
strategy:
165162
fail-fast: false
166163
matrix:
164+
# the config used in 'dockers/ipu-ci-runner/Dockerfile'
167165
include:
168166
- python_version: "3.8"
169167
pytorch_version: "1.7"

dockers/base-conda/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ RUN \
129129
conda info && \
130130
pip list && \
131131
python -c "import sys; ver = sys.version_info ; assert f'{ver.major}.{ver.minor}' == '$PYTHON_VERSION', ver" && \
132-
python -c "from torch import __version__ as ver; assert '.'.join(ver.split('.')[:2]) == '$PYTORCH_VERSION', ver"
132+
python -c "import torch; assert torch.__version__.startswith('$PYTORCH_VERSION'), torch.__version__"

dockers/base-cuda/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,4 @@ RUN \
119119
pip --version && \
120120
pip list && \
121121
python -c "import sys; ver = sys.version_info ; assert f'{ver.major}.{ver.minor}' == '$PYTHON_VERSION', ver" && \
122-
python -c "import torch; assert torch.__version__[:3] == '$PYTORCH_VERSION', torch.__version__"
122+
python -c "import torch; assert torch.__version__.startswith('$PYTORCH_VERSION'), torch.__version__"

dockers/base-ipu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ RUN \
9595
conda info && \
9696
pip list && \
9797
python -c "import sys; assert sys.version[:3] == '$PYTHON_VERSION', sys.version" && \
98-
python -c "import torch; assert torch.__version__[:3] == '$PYTORCH_VERSION', torch.__version__"
98+
python -c "import torch; assert torch.__version__.startswith('$PYTORCH_VERSION'), torch.__version__"

dockers/base-xla/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ RUN \
109109
conda info && \
110110
pip list && \
111111
python -c "import sys; assert sys.version[:3] == '$PYTHON_VERSION', sys.version" && \
112-
python -c "import torch; ver = '$XLA_VERSION' ; assert torch.__version__.startswith(ver), torch.__version__"
112+
python -c "import torch; assert torch.__version__.startswith('$XLA_VERSION'), torch.__version__"

dockers/nvidia/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN \
6161
python --version && \
6262
pip --version && \
6363
pip list | grep torch && \
64-
python -c "from torch import __version__ as ver ; assert ver == '$TORCH_VERSION', ver" && \
64+
python -c "import torch; assert torch.__version__.startswith('$TORCH_VERSION'), torch.__version__" && \
6565
python -c "import pytorch_lightning as pl; print(pl.__version__)"
6666

6767
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root"]

0 commit comments

Comments
 (0)