4747 - { python_version: "3.11", pytorch_version: "2.2", cuda_version: "12.1.0" }
4848 - { python_version: "3.11", pytorch_version: "2.3", cuda_version: "12.1.0" }
4949 - { 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" }
50+ - { python_version: "3.12", pytorch_version: "2.5", cuda_version: "12.1.0" , latest: true }
5151 steps :
5252 - uses : actions/checkout@v4
5353 with :
@@ -65,23 +65,13 @@ 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+ tags = $(python .actions/assistant.py generate_docker_tags \
69+ --release-version="${{ env.RELEASE_VERSION }}" \
70+ --python-version="${{ matrix.python_version }}" \
71+ --torch-version="${{ matrix.pytorch_version }}" \
72+ --cuda-version="${{ matrix.cuda_version }}" \
73+ --add_latest="${{ matrix.latest }}")
74+ echo "DOCKER_TAGS=$tags" >> $GITHUB_ENV
8575
8676 - uses : docker/build-push-action@v6
8777 with :
0 commit comments