@@ -43,11 +43,11 @@ jobs:
4343 include :
4444 # We only release one docker image per PyTorch version.
4545 # Make sure the matrix here matches the one below.
46- - { python_version: "3.10", pytorch_version: "2.1", cuda_version: "12.1.0 " }
47- - { python_version: "3.11", pytorch_version: "2.2", cuda_version: "12.1.0 " }
48- - { python_version: "3.11", pytorch_version: "2.3", cuda_version: "12.1.0 " }
49- - { python_version: "3.11", pytorch_version: "2.4", cuda_version: "12.1.0 " }
50- - { python_version: "3.12", pytorch_version: "2.5", cuda_version: "12.1.0 " }
46+ - { python_version: "3.10", pytorch_version: "2.1", cuda_version: "12.1.1 " }
47+ - { python_version: "3.11", pytorch_version: "2.2", cuda_version: "12.1.1 " }
48+ - { python_version: "3.11", pytorch_version: "2.3", cuda_version: "12.1.1 " }
49+ - { python_version: "3.11", pytorch_version: "2.4", cuda_version: "12.1.1 " }
50+ - { python_version: "3.12", pytorch_version: "2.5", cuda_version: "12.1.1", latest: "true " }
5151 steps :
5252 - uses : actions/checkout@v4
5353 with :
@@ -65,23 +65,14 @@ jobs:
6565 run : echo "RELEASE_VERSION=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV
6666 - name : Set tags
6767 run : |
68- import os
69-
70- repo = "pytorchlightning/pytorch_lightning"
71- ver = os.getenv('RELEASE_VERSION')
72- py_ver = "${{ matrix.python_version }}"
73- pt_ver = "${{ matrix.pytorch_version }}"
74- cuda_ver = "${{ matrix.cuda_version }}"
75- tags = [f"latest-py{py_ver}-torch{pt_ver}-cuda{cuda_ver}"]
76- if ver:
77- tags += [f"{ver}-py{py_ver}-torch{pt_ver}-cuda{cuda_ver}"]
78- if py_ver == '3.11' and pt_ver == '2.3' and cuda_ver == '12.1.0':
79- tags += ["latest"]
80-
81- tags = [f"{repo}:{tag}" for tag in tags]
82- with open(os.getenv('GITHUB_ENV'), "a") as gh_env:
83- gh_env.write("DOCKER_TAGS=" + ",".join(tags))
84- shell : python
68+ pip install -q -r .actions/requirements.txt
69+ tags=$(python .actions/assistant.py generate_docker_tags \
70+ --release_version="${{ env.RELEASE_VERSION }}" \
71+ --python_version="${{ matrix.python_version }}" \
72+ --torch_version="${{ matrix.pytorch_version }}" \
73+ --cuda_version="${{ matrix.cuda_version }}" \
74+ --add_latest="${{ matrix.latest || 'false' }}")
75+ echo "DOCKER_TAGS=$tags" >> $GITHUB_ENV
8576
8677 - uses : docker/build-push-action@v6
8778 with :
@@ -104,11 +95,11 @@ jobs:
10495 include :
10596 # These are the base images for PL release docker images.
10697 # Make sure the matrix here matches the one above.
107- - { python_version: "3.10", pytorch_version: "2.1.2", cuda_version: "12.1.0 " }
108- - { python_version: "3.11", pytorch_version: "2.2.2", cuda_version: "12.1.0 " }
109- - { python_version: "3.11", pytorch_version: "2.3.1", cuda_version: "12.1.0 " }
110- - { python_version: "3.11", pytorch_version: "2.4.1", cuda_version: "12.1.0 " }
111- - { python_version: "3.12", pytorch_version: "2.5.1", cuda_version: "12.1.0 " }
98+ - { python_version: "3.10", pytorch_version: "2.1.2", cuda_version: "12.1.1 " }
99+ - { python_version: "3.11", pytorch_version: "2.2.2", cuda_version: "12.1.1 " }
100+ - { python_version: "3.11", pytorch_version: "2.3.1", cuda_version: "12.1.1 " }
101+ - { python_version: "3.11", pytorch_version: "2.4.1", cuda_version: "12.1.1 " }
102+ - { python_version: "3.12", pytorch_version: "2.5.1", cuda_version: "12.1.1 " }
112103 steps :
113104 - uses : actions/checkout@v4
114105 - uses : docker/setup-buildx-action@v3
0 commit comments