@@ -4,7 +4,11 @@ name: Nightly events
44# https://github.202132.xyzmunity/t/distinct-job-for-each-schedule/17811/2
55on :
66 schedule :
7- - cron : " 0 0 * * *" # At the end of every day
7+ # At the end of every day
8+ - cron : " 0 0 * * *"
9+
10+ env :
11+ PUSH_TO_HUB : true
812
913# based on https://github.com/pypa/gh-action-pypi-publish
1014jobs :
1620 - uses : actions/checkout@v2
1721 - uses : actions/setup-python@v2
1822 with :
19- python-version : 3.7
23+ python-version : 3.8
2024
2125 - name : Install dependencies
2226 run : >-
4751 strategy :
4852 fail-fast : false
4953 matrix :
50- python_version : [3.7]
51- xla_version : [1.6, 1.7, 1.8] # todo: , "nightly"
54+ python_version : [" 3.7" ]
55+ xla_version : [" 1.6", " 1.7", " 1.8", "1.9" ] # todo: , "nightly"
5256 steps :
5357 - name : Checkout
5458 uses : actions/checkout@v2
@@ -70,24 +74,25 @@ jobs:
7074 PYTHON_VERSION=${{ matrix.python_version }}
7175 XLA_VERSION=${{ matrix.xla_version }}
7276 file : dockers/base-xla/Dockerfile
73- push : true
77+ push : ${{ env.PUSH_TO_HUB }}
7478 tags : pytorchlightning/pytorch_lightning:base-xla-py${{ matrix.python_version }}-torch${{ matrix.xla_version }}
7579 timeout-minutes : 55
7680
77- docker-cuda-conda :
81+ docker-CUDA :
7882 runs-on : ubuntu-20.04
7983 strategy :
8084 fail-fast : false
8185 matrix :
82- python_version : [3.6, 3.7, 3.8]
83- pytorch_version : [1.6, 1.7, 1.8, 1.9]
86+ python_version : ["3.6", "3.7", "3.8", "3.9"]
87+ pytorch_version : ["1.6", "1.7", "1.8", "1.9"]
88+ exclude :
89+ - python_version : " 3.9"
90+ pytorch_version : " 1.6"
8491
8592 steps :
8693 - name : Checkout
8794 uses : actions/checkout@v2
8895
89- # https://github.com/docker/setup-buildx-action
90- # Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
9196 - uses : docker/setup-buildx-action@v1
9297 - name : Login to DockerHub
9398 uses : docker/login-action@v1
@@ -96,19 +101,45 @@ jobs:
96101 password : ${{ secrets.DOCKER_PASSWORD }}
97102
98103 - name : Publish CUDA to Docker Hub
99- if : matrix.pytorch_version <= 1.8
100104 # publish master/release
101105 uses : docker/build-push-action@v2
102106 with :
103107 build-args : |
104108 PYTHON_VERSION=${{ matrix.python_version }}
105109 PYTORCH_VERSION=${{ matrix.pytorch_version }}
106- CUDA_VERSION=10.2
107110 file : dockers/base-cuda/Dockerfile
108- push : true
111+ push : ${{ env.PUSH_TO_HUB }}
109112 tags : pytorchlightning/pytorch_lightning:base-cuda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
110113 timeout-minutes : 55
111114
115+ docker-Conda :
116+ runs-on : ubuntu-20.04
117+ strategy :
118+ fail-fast : false
119+ matrix :
120+ python_version : ["3.6", "3.7", "3.8", "3.9"]
121+ pytorch_version : ["1.6", "1.7", "1.8", "1.9", "1.10"]
122+ exclude :
123+ - python_version : " 3.9"
124+ pytorch_version : " 1.6"
125+
126+ steps :
127+ - name : Checkout
128+ uses : actions/checkout@v2
129+
130+ - uses : docker/setup-buildx-action@v1
131+ - name : Login to DockerHub
132+ uses : docker/login-action@v1
133+ with :
134+ username : ${{ secrets.DOCKER_USERNAME }}
135+ password : ${{ secrets.DOCKER_PASSWORD }}
136+
137+ # see: https://pytorch.org/get-started/previous-versions/
138+ - run : |
139+ 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)
140+ echo "::set-output name=CUDA::$cuda"
141+ id: extend
142+
112143 - name : Publish Conda to Docker Hub
113144 # publish master/release
114145 uses : docker/build-push-action@v2
@@ -118,11 +149,11 @@ jobs:
118149 PYTORCH_VERSION=${{ matrix.pytorch_version }}
119150 CUDA_VERSION=${{ steps.extend.outputs.CUDA }}
120151 file : dockers/base-conda/Dockerfile
121- push : true
152+ push : ${{ env.PUSH_TO_HUB }}
122153 tags : pytorchlightning/pytorch_lightning:base-conda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
123154 timeout-minutes : 55
124155
125- docker-nvidia :
156+ docker-NVIDIA :
126157 runs-on : ubuntu-20.04
127158 # todo: temporarily skip as the base container does not fit to agent
128159 if : false
@@ -143,18 +174,17 @@ jobs:
143174 uses : docker/build-push-action@v2
144175 with :
145176 file : dockers/nvidia/Dockerfile
146- push : true
147- tags : nvcr.io/pytorchlightning/pytorch_lightning:nvidia
177+ tags : nvcr.io/pytorchlightning/pytorch_lightning:latest
148178 timeout-minutes : 55
149179
150- docker-ipu :
180+ docker-IPU :
151181 runs-on : ubuntu-20.04
152182 strategy :
153183 fail-fast : false
154184 matrix :
155185 include :
156- - python_version : 3.8
157- pytorch_version : 1.7
186+ - python_version : " 3.8"
187+ pytorch_version : " 1.7"
158188
159189 steps :
160190 - name : Checkout
@@ -177,7 +207,7 @@ jobs:
177207 PYTHON_VERSION=${{ matrix.python_version }}
178208 PYTORCH_VERSION=${{ matrix.pytorch_version }}
179209 file : dockers/base-ipu/Dockerfile
180- push : true
210+ push : ${{ env.PUSH_TO_HUB }}
181211 tags : pytorchlightning/pytorch_lightning:base-ipu-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
182212 timeout-minutes : 55
183213
@@ -189,6 +219,6 @@ jobs:
189219 PYTHON_VERSION=${{ matrix.python_version }}
190220 PYTORCH_VERSION=${{ matrix.pytorch_version }}
191221 file : dockers/ipu-ci-runner/Dockerfile
192- push : true
222+ push : ${{ env.PUSH_TO_HUB }}
193223 tags : pytorchlightning/pytorch_lightning:ipu-ci-runner-py${{ matrix.python_version }}
194224 timeout-minutes : 55
0 commit comments