2021-11-10 16:59:10 +00:00
|
|
|
name: Docker
|
2022-08-10 10:37:50 +00:00
|
|
|
|
2020-04-26 12:01:55 +00:00
|
|
|
on:
|
2020-04-26 20:10:58 +00:00
|
|
|
push:
|
2021-01-12 12:56:20 +00:00
|
|
|
branches: [master, "release/*"]
|
2020-04-26 20:10:58 +00:00
|
|
|
release:
|
2021-05-06 19:05:35 +00:00
|
|
|
types: [published]
|
2020-04-26 12:01:55 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-11-10 16:59:10 +00:00
|
|
|
publish:
|
2020-06-27 20:25:33 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-05-19 19:15:58 +00:00
|
|
|
# only on releases
|
|
|
|
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
|
2020-04-26 12:01:55 +00:00
|
|
|
strategy:
|
2020-08-07 13:10:35 +00:00
|
|
|
fail-fast: false
|
2020-04-26 12:01:55 +00:00
|
|
|
matrix:
|
2022-08-10 10:37:50 +00:00
|
|
|
include:
|
|
|
|
# We only release one docker image per PyTorch version.
|
|
|
|
- {python_version: "3.9", pytorch_version: "1.11", cuda_version: "11.3.1"}
|
2022-08-23 16:10:52 +00:00
|
|
|
- {python_version: "3.9", pytorch_version: "1.12", cuda_version: "11.6.1"}
|
2023-01-04 22:44:23 +00:00
|
|
|
- {python_version: "3.9", pytorch_version: "1.13", cuda_version: "11.7.1"}
|
2020-04-26 12:01:55 +00:00
|
|
|
steps:
|
2020-06-27 01:38:25 +00:00
|
|
|
- name: Checkout
|
2022-09-05 17:13:08 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-05-12 10:54:59 +00:00
|
|
|
|
|
|
|
- name: Get release version
|
|
|
|
id: get_version
|
2022-11-09 14:07:52 +00:00
|
|
|
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
|
2020-05-12 10:54:59 +00:00
|
|
|
|
|
|
|
- name: Publish Releases to Docker
|
2022-09-12 13:37:49 +00:00
|
|
|
uses: docker/build-push-action@v3
|
2020-05-12 10:54:59 +00:00
|
|
|
with:
|
|
|
|
repository: pytorchlightning/pytorch_lightning
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2020-10-26 10:47:09 +00:00
|
|
|
dockerfile: dockers/release/Dockerfile
|
2022-08-10 10:37:50 +00:00
|
|
|
build_args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
|
|
|
CUDA_VERSION=${{ matrix.cuda_version }}
|
|
|
|
LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
|
|
|
|
tags: |
|
|
|
|
${{ steps.get_version.outputs.RELEASE_VERSION }}-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}-cuda${{ matrix.cuda_version }}
|
|
|
|
latest-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}-cuda${{ matrix.cuda_version }}
|
2020-09-22 23:41:35 +00:00
|
|
|
timeout-minutes: 55
|
2021-03-19 21:25:46 +00:00
|
|
|
|
2021-05-19 19:15:58 +00:00
|
|
|
- name: Publish Latest to Docker
|
2022-09-12 13:37:49 +00:00
|
|
|
uses: docker/build-push-action@v3
|
2022-08-10 10:37:50 +00:00
|
|
|
# Only latest Python and PyTorch
|
2022-11-12 14:58:37 +00:00
|
|
|
if: matrix.python_version == '3.9' && matrix.pytorch_version == '1.13'
|
2021-05-19 19:15:58 +00:00
|
|
|
with:
|
|
|
|
repository: pytorchlightning/pytorch_lightning
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
dockerfile: dockers/release/Dockerfile
|
2022-08-10 10:37:50 +00:00
|
|
|
build_args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
|
|
|
CUDA_VERSION=${{ matrix.cuda_version }}
|
|
|
|
LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
|
2021-05-19 19:15:58 +00:00
|
|
|
tags: "latest"
|
|
|
|
timeout-minutes: 55
|