73 lines
2.9 KiB
YAML
73 lines
2.9 KiB
YAML
name: Publish Docker Releases
|
|
# https://www.docker.com/blog/first-docker-github-action-is-here
|
|
# https://github.com/docker/build-push-action
|
|
on:
|
|
push:
|
|
branches: [master, "release/*"]
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
cuda-PL:
|
|
runs-on: ubuntu-20.04
|
|
# only on releases
|
|
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python_version: ["3.6", "3.7", "3.8", "3.9"]
|
|
pytorch_version: ["1.6", "1.7", "1.8", "1.9"]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Get release version
|
|
id: get_version
|
|
run: echo "::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/})"
|
|
|
|
- name: Publish Releases to Docker
|
|
uses: docker/build-push-action@v1.1.0
|
|
with:
|
|
repository: pytorchlightning/pytorch_lightning
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
dockerfile: dockers/release/Dockerfile
|
|
build_args: PYTHON_VERSION=${{ matrix.python_version }},PYTORCH_VERSION=${{ matrix.pytorch_version }},LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
|
|
tags: "${{ steps.get_version.outputs.RELEASE_VERSION }}-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }},latest-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}"
|
|
timeout-minutes: 55
|
|
|
|
- name: Publish Latest to Docker
|
|
uses: docker/build-push-action@v1.1.0
|
|
# only on releases AND latest PT and py
|
|
if: matrix.python_version == 3.9 && matrix.pytorch_version == 1.9
|
|
with:
|
|
repository: pytorchlightning/pytorch_lightning
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
dockerfile: dockers/release/Dockerfile
|
|
build_args: PYTHON_VERSION=${{ matrix.python_version }},PYTORCH_VERSION=${{ matrix.pytorch_version }},LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
|
|
tags: "latest"
|
|
timeout-minutes: 55
|
|
|
|
# nvidia-PL:
|
|
# runs-on: ubuntu-20.04
|
|
# if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
|
|
# steps:
|
|
# - name: Checkout
|
|
# uses: actions/checkout@v2
|
|
#
|
|
# - name: Get release version
|
|
# id: get_version
|
|
# run: echo "::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/})"
|
|
#
|
|
# - name: Publish Releases to Docker
|
|
# uses: docker/build-push-action@v1.1.0
|
|
# with:
|
|
# repository: nvcr.io/pytorchlightning/pytorch_lightning
|
|
# username: ${{ secrets.DOCKER_USERNAME }}
|
|
# password: ${{ secrets.DOCKER_PASSWORD }}
|
|
# dockerfile: dockers/nvidia/Dockerfile
|
|
# build_args: LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
|
|
# tags: "${{ steps.get_version.outputs.RELEASE_VERSION }}-nvidia"
|
|
# timeout-minutes: 55
|