ci: fix release docker workflow (#18322)
This commit is contained in:
parent
c9929e614b
commit
795f2909b5
|
@ -416,3 +416,13 @@ subprojects:
|
|||
- "install-pkg (windows-2022, lightning, 3.10)"
|
||||
- "install-pkg (windows-2022, notset, 3.8)"
|
||||
- "install-pkg (windows-2022, notset, 3.10)"
|
||||
|
||||
- id: "release dockers"
|
||||
paths:
|
||||
- ".github/workflows/release-docker.yml"
|
||||
- "dockers/release/*"
|
||||
checks:
|
||||
- "publish-docker (3.9, 1.13, 12.0.1)"
|
||||
- "publish-docker (3.9, 1.13, 12.0.1)"
|
||||
- "publish-docker (3.10, 2.0, 11.8.0)"
|
||||
- "publish-docker (3.10, 2.0, 12.0.1)"
|
||||
|
|
|
@ -3,20 +3,22 @@ name: Docker
|
|||
on:
|
||||
push:
|
||||
branches: [master, "release/*"]
|
||||
pull_request:
|
||||
branches: [master, "release/*"]
|
||||
paths:
|
||||
- ".github/workflows/release-docker.yml"
|
||||
- "dockers/release/*"
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-20.04
|
||||
# only on releases
|
||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
|
||||
publish-docker:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# We only release one docker image per PyTorch version.
|
||||
- {python_version: "3.9", pytorch_version: "1.12", cuda_version: "11.7.1"}
|
||||
- {python_version: "3.9", pytorch_version: "1.13", cuda_version: "11.8.0"}
|
||||
- {python_version: "3.9", pytorch_version: "1.13", cuda_version: "12.0.1"}
|
||||
- {python_version: "3.10", pytorch_version: "2.0", cuda_version: "11.8.0"}
|
||||
|
@ -24,6 +26,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Get release version
|
||||
id: get_version
|
||||
|
@ -35,7 +39,9 @@ jobs:
|
|||
repository: pytorchlightning/pytorch_lightning
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: dockers/release/Dockerfile
|
||||
# only on releases
|
||||
push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'release' }}
|
||||
file: dockers/release/Dockerfile
|
||||
build_args: |
|
||||
PYTHON_VERSION=${{ matrix.python_version }}
|
||||
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
||||
|
@ -49,12 +55,14 @@ jobs:
|
|||
- name: Publish Latest to Docker
|
||||
uses: docker/build-push-action@v4
|
||||
# Only latest Python and PyTorch
|
||||
if: matrix.python_version == '3.9' && matrix.pytorch_version == '1.13'
|
||||
if: matrix.python_version == '3.10' && matrix.pytorch_version == '2.0'
|
||||
with:
|
||||
repository: pytorchlightning/pytorch_lightning
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
dockerfile: dockers/release/Dockerfile
|
||||
# only on releases
|
||||
push: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'release' }}
|
||||
file: dockers/release/Dockerfile
|
||||
build_args: |
|
||||
PYTHON_VERSION=${{ matrix.python_version }}
|
||||
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
||||
|
|
Loading…
Reference in New Issue