2022-07-12 10:08:37 +00:00
|
|
|
name: Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master, "release/*"]
|
|
|
|
pull_request:
|
|
|
|
branches: [master, "release/*"]
|
2022-11-04 16:17:48 +00:00
|
|
|
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
|
2022-07-12 10:08:37 +00:00
|
|
|
paths:
|
2022-11-26 01:16:48 +00:00
|
|
|
- ".actions/**"
|
2023-03-02 22:17:29 +00:00
|
|
|
- ".github/workflows/ci-dockers-pytorch.yml"
|
2022-11-26 01:16:48 +00:00
|
|
|
- "dockers/**"
|
2023-01-14 03:02:10 +00:00
|
|
|
- "requirements/*.txt"
|
2022-11-11 16:38:09 +00:00
|
|
|
- "requirements/pytorch/**"
|
2023-01-04 15:57:18 +00:00
|
|
|
- "requirements/fabric/**"
|
2022-07-12 10:08:37 +00:00
|
|
|
- "environment.yml"
|
|
|
|
- "setup.py"
|
2022-11-26 01:16:48 +00:00
|
|
|
- "!requirements/*/docs.txt"
|
2022-11-16 10:07:02 +00:00
|
|
|
- "!*.md"
|
|
|
|
- "!**/*.md"
|
2022-07-12 10:08:37 +00:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * *" # at the end of every day
|
2023-01-04 22:44:23 +00:00
|
|
|
release:
|
|
|
|
types: [published]
|
2022-07-12 10:08:37 +00:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}-${{ github.event_name }}
|
|
|
|
cancel-in-progress: ${{ ! (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/')) }}
|
|
|
|
|
|
|
|
env:
|
2023-01-04 22:44:23 +00:00
|
|
|
PUSH_NIGHTLY: ${{ github.event_name == 'schedule' }}
|
|
|
|
PUSH_RELEASE: ${{ github.event_name == 'release' }}
|
2022-07-12 10:08:37 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-pl:
|
2022-11-04 16:17:48 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2022-07-12 10:08:37 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-08-10 10:37:50 +00:00
|
|
|
include:
|
|
|
|
# We only release one docker image per PyTorch version.
|
|
|
|
# The matrix here is the same as the one in release-docker.yml.
|
|
|
|
- {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"}
|
2022-07-12 10:08:37 +00:00
|
|
|
steps:
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-12 19:14:03 +00:00
|
|
|
- uses: docker/setup-buildx-action@v2
|
2023-02-06 10:47:16 +00:00
|
|
|
- uses: docker/build-push-action@v4
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
2022-08-10 10:37:50 +00:00
|
|
|
CUDA_VERSION=${{ matrix.cuda_version }}
|
2022-07-12 10:08:37 +00:00
|
|
|
file: dockers/release/Dockerfile
|
2023-01-04 22:44:23 +00:00
|
|
|
push: ${{ env.PUSH_RELEASE }} # pushed in release-docker.yml only when PL is released
|
2022-07-12 10:08:37 +00:00
|
|
|
timeout-minutes: 50
|
|
|
|
|
|
|
|
build-xla:
|
2022-11-04 16:17:48 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2022-07-12 10:08:37 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-10-21 18:01:39 +00:00
|
|
|
# the config used in '.github/workflows/tpu-tests.yml'
|
2023-02-01 01:36:42 +00:00
|
|
|
python_version: ["3.8"]
|
2022-08-05 09:04:45 +00:00
|
|
|
xla_version: ["1.12"]
|
2022-07-12 10:08:37 +00:00
|
|
|
steps:
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-12 19:14:03 +00:00
|
|
|
- uses: docker/setup-buildx-action@v2
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: docker/login-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2023-02-06 10:47:16 +00:00
|
|
|
- uses: docker/build-push-action@v4
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
XLA_VERSION=${{ matrix.xla_version }}
|
|
|
|
file: dockers/base-xla/Dockerfile
|
2023-01-04 22:44:23 +00:00
|
|
|
push: ${{ env.PUSH_NIGHTLY }}
|
2022-07-12 10:08:37 +00:00
|
|
|
tags: pytorchlightning/pytorch_lightning:base-xla-py${{ matrix.python_version }}-torch${{ matrix.xla_version }}
|
|
|
|
timeout-minutes: 60
|
2022-08-26 20:41:36 +00:00
|
|
|
- uses: ravsamhq/notify-slack-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: failure() && env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
notification_title: ${{ format('XLA; {0} py{1} for *{2}*', runner.os, matrix.python_version, matrix.xla_version) }}
|
|
|
|
message_format: '{emoji} *{workflow}* {status_message}, see <{run_url}|detail>, cc: <@U01GD29QCAV>' # kaushikb11
|
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
|
|
|
|
build-cuda:
|
2022-11-04 16:17:48 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2022-07-12 10:08:37 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2022-08-10 10:37:50 +00:00
|
|
|
# These are the base images for PL release docker images,
|
|
|
|
# so include at least all of the combinations in release-dockers.yml.
|
|
|
|
- {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"}
|
2023-03-02 22:17:29 +00:00
|
|
|
- {python_version: "3.10", pytorch_version: "1.13", cuda_version: "11.7.1"}
|
2022-07-12 10:08:37 +00:00
|
|
|
steps:
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-12 19:14:03 +00:00
|
|
|
- uses: docker/setup-buildx-action@v2
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: docker/login-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2023-02-06 10:47:16 +00:00
|
|
|
- uses: docker/build-push-action@v4
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
|
|
|
CUDA_VERSION=${{ matrix.cuda_version }}
|
|
|
|
file: dockers/base-cuda/Dockerfile
|
2023-01-04 22:44:23 +00:00
|
|
|
push: ${{ env.PUSH_NIGHTLY }}
|
2022-08-10 10:37:50 +00:00
|
|
|
tags: pytorchlightning/pytorch_lightning:base-cuda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}-cuda${{ matrix.cuda_version }}
|
2022-07-12 10:08:37 +00:00
|
|
|
timeout-minutes: 95
|
2022-08-26 20:41:36 +00:00
|
|
|
- uses: ravsamhq/notify-slack-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: failure() && env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
notification_title: ${{ format('CUDA; {0} py{1} for *{2}*', runner.os, matrix.python_version, matrix.pytorch_version) }}
|
|
|
|
message_format: '{emoji} *{workflow}* {status_message}, see <{run_url}|detail>, cc: <@U01A5T7EY9M>' # akihironitta
|
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
|
|
|
|
build-ipu:
|
2022-11-04 16:17:48 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2022-07-12 10:08:37 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# the config used in 'dockers/ci-runner-ipu/Dockerfile'
|
2023-02-01 19:09:12 +00:00
|
|
|
- {python_version: "3.9", pytorch_version: "1.13"}
|
2022-07-12 10:08:37 +00:00
|
|
|
steps:
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-12 19:14:03 +00:00
|
|
|
- uses: docker/setup-buildx-action@v2
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: docker/login-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2023-02-06 10:47:16 +00:00
|
|
|
- uses: docker/build-push-action@v4
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
|
|
|
file: dockers/base-ipu/Dockerfile
|
2023-01-04 22:44:23 +00:00
|
|
|
push: ${{ env.PUSH_NIGHTLY }}
|
2022-07-12 10:08:37 +00:00
|
|
|
tags: pytorchlightning/pytorch_lightning:base-ipu-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
|
|
|
|
timeout-minutes: 100
|
2023-02-06 10:47:16 +00:00
|
|
|
- uses: docker/build-push-action@v4
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
|
|
|
file: dockers/ci-runner-ipu/Dockerfile
|
2023-01-04 22:44:23 +00:00
|
|
|
push: ${{ env.PUSH_NIGHTLY }}
|
2022-07-12 10:08:37 +00:00
|
|
|
tags: pytorchlightning/pytorch_lightning:ipu-ci-runner-py${{ matrix.python_version }}
|
|
|
|
timeout-minutes: 10
|
2022-08-26 20:41:36 +00:00
|
|
|
- uses: ravsamhq/notify-slack-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: failure() && env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
notification_title: ${{ format('IPU; {0} py{1} for *{2}*', runner.os, matrix.python_version, matrix.pytorch_version) }}
|
2022-08-10 10:37:50 +00:00
|
|
|
message_format: '{emoji} *{workflow}* {status_message}, see <{run_url}|detail>, cc: <@U01GD29QCAV>' # kaushikb11
|
2022-07-12 10:08:37 +00:00
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
|
|
|
|
build-hpu:
|
2022-11-04 16:17:48 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2022-07-12 10:08:37 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
# the config used in 'dockers/ci-runner-hpu/Dockerfile'
|
|
|
|
- {gaudi_version: "1.5.0", pytorch_version: "1.11.0"}
|
|
|
|
steps:
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-12 19:14:03 +00:00
|
|
|
- uses: docker/setup-buildx-action@v2
|
2022-08-10 10:37:50 +00:00
|
|
|
- uses: docker/login-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2023-02-06 10:47:16 +00:00
|
|
|
- uses: docker/build-push-action@v4
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
DIST=latest
|
|
|
|
GAUDI_VERSION=${{ matrix.gaudi_version }}
|
2022-07-20 10:35:01 +00:00
|
|
|
PYTORCH_INSTALLER_VERSION=${{ matrix.pytorch_version }}
|
2022-07-12 10:08:37 +00:00
|
|
|
file: dockers/ci-runner-hpu/Dockerfile
|
2023-01-04 22:44:23 +00:00
|
|
|
push: ${{ env.PUSH_NIGHTLY }}
|
2022-07-12 10:08:37 +00:00
|
|
|
tags: pytorchlightning/pytorch_lightning:hpu-ci-runner-gaudi${{ matrix.gaudi_version }}
|
|
|
|
timeout-minutes: 10
|
2022-08-26 20:41:36 +00:00
|
|
|
- uses: ravsamhq/notify-slack-action@v2
|
2023-01-04 22:44:23 +00:00
|
|
|
if: failure() && env.PUSH_NIGHTLY == 'true'
|
2022-07-12 10:08:37 +00:00
|
|
|
with:
|
|
|
|
status: ${{ job.status }}
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
notification_title: ${{ format('HPU; {0} py{1} for *{2}*', runner.os, matrix.gaudi_version, matrix.pytorch_version) }}
|
|
|
|
message_format: '{emoji} *{workflow}* {status_message}, see <{run_url}|detail>, cc: <@U02PV6CL144> <@U0355SJN6HK>' # arao & Mythravarun N R
|
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
2022-07-15 21:36:19 +00:00
|
|
|
|
|
|
|
build-NGC:
|
2022-11-04 16:17:48 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2022-07-15 21:36:19 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-08-10 10:37:50 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-07-15 21:36:19 +00:00
|
|
|
- name: Build Conda Docker
|
|
|
|
# publish master/release
|
2023-02-06 10:47:16 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2022-07-15 21:36:19 +00:00
|
|
|
with:
|
|
|
|
file: dockers/nvidia/Dockerfile
|
|
|
|
push: false
|
|
|
|
timeout-minutes: 55
|
2023-01-14 03:02:10 +00:00
|
|
|
|
|
|
|
build-docs:
|
2023-02-27 20:14:23 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2023-01-14 03:02:10 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: docker/setup-buildx-action@v2
|
|
|
|
- uses: docker/login-action@v2
|
|
|
|
if: env.PUSH_NIGHTLY == 'true'
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2023-02-06 10:47:16 +00:00
|
|
|
- uses: docker/build-push-action@v4
|
2023-01-14 03:02:10 +00:00
|
|
|
with:
|
|
|
|
file: dockers/docs/Dockerfile
|
|
|
|
push: ${{ env.PUSH_NIGHTLY }}
|
|
|
|
tags: pytorchlightning/pytorch_lightning:docs
|