2020-09-19 22:28:34 +00:00
|
|
|
name: Nightly events
|
|
|
|
|
|
|
|
# https://jasonet.co/posts/scheduled-actions/
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# At the end of every day
|
|
|
|
- cron: "0 0 * * *"
|
|
|
|
|
|
|
|
# based on https://github.com/pypa/gh-action-pypi-publish
|
|
|
|
jobs:
|
2020-10-26 10:47:09 +00:00
|
|
|
|
2020-09-25 13:58:01 +00:00
|
|
|
pypi-release:
|
2020-09-19 22:28:34 +00:00
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.7
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: >-
|
|
|
|
python -m pip install --user --upgrade setuptools wheel
|
|
|
|
- name: Build
|
2020-09-25 12:15:06 +00:00
|
|
|
run: |
|
2020-10-02 09:26:21 +00:00
|
|
|
python .github/prepare-nightly_version.py
|
2020-09-19 22:28:34 +00:00
|
|
|
python setup.py sdist bdist_wheel
|
|
|
|
ls -lh dist/
|
|
|
|
|
|
|
|
# We do this, since failures on test.pypi aren't that bad
|
|
|
|
- name: Publish to Test PyPI
|
2020-11-06 10:48:27 +00:00
|
|
|
uses: pypa/gh-action-pypi-publish@v1.4.1
|
2020-09-19 22:28:34 +00:00
|
|
|
with:
|
|
|
|
user: __token__
|
|
|
|
password: ${{ secrets.test_pypi_password }}
|
|
|
|
repository_url: https://test.pypi.org/legacy/
|
2020-09-30 12:37:52 +00:00
|
|
|
verbose: true
|
2020-09-25 13:58:01 +00:00
|
|
|
|
|
|
|
docker-XLA:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
python_version: [3.6, 3.7]
|
2020-10-06 21:29:43 +00:00
|
|
|
xla_version: [1.6] # todo: , "nightly"
|
2020-09-25 13:58:01 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-10-25 12:16:10 +00:00
|
|
|
# https://github.com/docker/setup-buildx-action
|
2020-10-26 10:47:09 +00:00
|
|
|
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
|
|
|
|
- uses: docker/setup-buildx-action@v1
|
2020-10-25 12:16:10 +00:00
|
|
|
- name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v1
|
2020-09-25 13:58:01 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2020-10-25 12:16:10 +00:00
|
|
|
|
|
|
|
- name: Publish XLA to Docker Hub
|
2020-11-04 09:08:37 +00:00
|
|
|
# publish master/release
|
2020-10-25 12:16:10 +00:00
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
XLA_VERSION=${{ matrix.xla_version }}
|
2020-11-04 22:08:17 +00:00
|
|
|
cache-from: pytorchlightning/pytorch_lightning:base-xla-py${{ matrix.python_version }}-torch${{ matrix.xla_version }}
|
|
|
|
cache-to: type=inline
|
2020-10-25 12:16:10 +00:00
|
|
|
file: dockers/base-xla/Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: pytorchlightning/pytorch_lightning:base-xla-py${{ matrix.python_version }}-torch${{ matrix.xla_version }}
|
2020-09-25 13:58:01 +00:00
|
|
|
timeout-minutes: 55
|
|
|
|
|
|
|
|
docker-cuda:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
python_version: [3.6, 3.7, 3.8]
|
2020-10-30 15:42:14 +00:00
|
|
|
pytorch_version: [1.3, 1.4, 1.5, 1.6, 1.7]
|
2020-09-25 13:58:01 +00:00
|
|
|
exclude:
|
2020-10-26 10:47:09 +00:00
|
|
|
# excludes PT 1.3 as it is missing on pypi
|
|
|
|
- python_version: 3.8
|
|
|
|
pytorch_version: 1.3
|
|
|
|
|
2020-09-25 13:58:01 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2020-10-25 12:16:10 +00:00
|
|
|
# https://github.com/docker/setup-buildx-action
|
2020-10-26 10:47:09 +00:00
|
|
|
# Set up Docker Buildx - to use cache-from and cache-to argument of buildx command
|
|
|
|
- uses: docker/setup-buildx-action@v1
|
2020-10-25 12:16:10 +00:00
|
|
|
- name: Login to DockerHub
|
|
|
|
uses: docker/login-action@v1
|
2020-09-25 13:58:01 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2020-10-25 12:16:10 +00:00
|
|
|
|
2020-10-26 10:47:09 +00:00
|
|
|
# for PT 1.3 and 1.4 we need to use CUDA 10.1
|
|
|
|
- run: |
|
|
|
|
cuda=$(python -c "print(10.2 if float(${{matrix.pytorch_version}}) > 1.4 else 10.1)" 2>&1)
|
|
|
|
echo "::set-output name=CUDA::$cuda"
|
|
|
|
channel=$(python -c "print('pytorch-nightly' if float(${{matrix.pytorch_version}}) > 1.7 else 'pytorch')" 2>&1)
|
|
|
|
echo "::set-output name=CHANNEL::$channel"
|
|
|
|
id: extend
|
|
|
|
|
2020-10-25 12:16:10 +00:00
|
|
|
- name: Publish CUDA to Docker Hub
|
2020-11-04 09:08:37 +00:00
|
|
|
# publish master/release
|
2020-10-25 12:16:10 +00:00
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
2020-10-26 10:47:09 +00:00
|
|
|
CUDA_VERSION=${{ steps.extend.outputs.CUDA }}
|
2020-11-04 22:08:17 +00:00
|
|
|
cache-from: pytorchlightning/pytorch_lightning:base-cuda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
|
|
|
|
cache-to: type=inline
|
2020-10-25 12:16:10 +00:00
|
|
|
file: dockers/base-cuda/Dockerfile
|
|
|
|
push: true
|
|
|
|
tags: pytorchlightning/pytorch_lightning:base-cuda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
|
2020-09-25 13:58:01 +00:00
|
|
|
timeout-minutes: 55
|
|
|
|
|
2020-10-02 09:26:21 +00:00
|
|
|
- name: Publish Conda to Docker Hub
|
2020-11-04 09:08:37 +00:00
|
|
|
# publish master/release
|
2020-10-25 12:16:10 +00:00
|
|
|
uses: docker/build-push-action@v2
|
2020-09-25 13:58:01 +00:00
|
|
|
with:
|
2020-10-25 12:16:10 +00:00
|
|
|
build-args: |
|
|
|
|
PYTHON_VERSION=${{ matrix.python_version }}
|
|
|
|
PYTORCH_VERSION=${{ matrix.pytorch_version }}
|
2020-10-26 10:47:09 +00:00
|
|
|
PYTORCH_CHANNEL=${{ steps.extend.outputs.CHANNEL }}
|
|
|
|
CUDA_VERSION=${{ steps.extend.outputs.CUDA }}
|
2020-11-04 22:08:17 +00:00
|
|
|
cache-from: pytorchlightning/pytorch_lightning:base-conda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
|
|
|
|
cache-to: type=inline
|
2020-10-26 10:47:09 +00:00
|
|
|
file: dockers/base-conda/Dockerfile
|
2020-10-25 12:16:10 +00:00
|
|
|
push: true
|
2020-10-26 10:47:09 +00:00
|
|
|
tags: pytorchlightning/pytorch_lightning:base-conda-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}
|
2020-09-25 13:58:01 +00:00
|
|
|
timeout-minutes: 55
|