|
name: Build docker images (scheduled) |
|
|
|
on: |
|
push: |
|
branches: |
|
- docker-image* |
|
repository_dispatch: |
|
workflow_call: |
|
inputs: |
|
image_postfix: |
|
required: true |
|
type: string |
|
schedule: |
|
- cron: "0 1 * * *" |
|
|
|
concurrency: |
|
group: docker-images-builds |
|
cancel-in-progress: false |
|
|
|
jobs: |
|
latest-docker: |
|
name: "Latest PyTorch + TensorFlow [dev]" |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Cleanup disk |
|
run: | |
|
sudo ls -l /usr/local/lib/ |
|
sudo ls -l /usr/share/ |
|
sudo du -sh /usr/local/lib/ |
|
sudo du -sh /usr/share/ |
|
sudo rm -rf /usr/local/lib/android |
|
sudo rm -rf /usr/share/dotnet |
|
sudo du -sh /usr/local/lib/ |
|
sudo du -sh /usr/share/ |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
- |
|
name: Build and push |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-all-latest-gpu |
|
build-args: | |
|
REF=main |
|
push: true |
|
tags: huggingface/transformers-all-latest-gpu${{ inputs.image_postfix }} |
|
|
|
- |
|
name: Build and push (for Push CI) in a daily basis |
|
|
|
|
|
if: inputs.image_postfix != '-push-ci' |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-all-latest-gpu |
|
build-args: | |
|
REF=main |
|
push: true |
|
tags: huggingface/transformers-all-latest-gpu-push-ci |
|
|
|
latest-with-torch-nightly-docker: |
|
name: "Nightly PyTorch + Stable TensorFlow" |
|
|
|
if: inputs.image_postfix != '-push-ci' |
|
runs-on: ubuntu-latest |
|
steps: |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
- |
|
name: Build and push |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-all-latest-gpu |
|
build-args: | |
|
REF=main |
|
PYTORCH=pre |
|
push: true |
|
tags: huggingface/transformers-all-latest-torch-nightly-gpu |
|
|
|
latest-torch-deepspeed-docker: |
|
name: "Latest PyTorch + DeepSpeed" |
|
runs-on: ubuntu-latest |
|
steps: |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
- |
|
name: Build and push |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-pytorch-deepspeed-latest-gpu |
|
build-args: | |
|
REF=main |
|
push: true |
|
tags: huggingface/transformers-pytorch-deepspeed-latest-gpu${{ inputs.image_postfix }} |
|
|
|
|
|
latest-torch-deepspeed-docker-for-push-ci-daily-build: |
|
name: "Latest PyTorch + DeepSpeed (Push CI - Daily Build)" |
|
runs-on: ubuntu-latest |
|
steps: |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
|
|
- |
|
name: Build and push (for Push CI) in a daily basis |
|
|
|
|
|
if: inputs.image_postfix != '-push-ci' |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-pytorch-deepspeed-latest-gpu |
|
build-args: | |
|
REF=main |
|
push: true |
|
tags: huggingface/transformers-pytorch-deepspeed-latest-gpu-push-ci |
|
|
|
nightly-torch-deepspeed-docker: |
|
name: "Nightly PyTorch + DeepSpeed" |
|
|
|
if: inputs.image_postfix != '-push-ci' |
|
runs-on: ubuntu-latest |
|
steps: |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
- |
|
name: Build and push |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-pytorch-deepspeed-nightly-gpu |
|
build-args: | |
|
REF=main |
|
push: true |
|
tags: huggingface/transformers-pytorch-deepspeed-nightly-gpu |
|
|
|
doc-builder: |
|
name: "Doc builder" |
|
|
|
if: inputs.image_postfix != '-push-ci' |
|
runs-on: ubuntu-latest |
|
steps: |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
- |
|
name: Build and push |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-doc-builder |
|
push: true |
|
tags: huggingface/transformers-doc-builder |
|
|
|
latest-pytorch: |
|
name: "Latest PyTorch [dev]" |
|
|
|
if: inputs.image_postfix != '-push-ci' |
|
runs-on: ubuntu-latest |
|
steps: |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
- |
|
name: Build and push |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-pytorch-gpu |
|
build-args: | |
|
REF=main |
|
push: true |
|
tags: huggingface/transformers-pytorch-gpu |
|
|
|
latest-tensorflow: |
|
name: "Latest TensorFlow [dev]" |
|
|
|
if: inputs.image_postfix != '-push-ci' |
|
runs-on: ubuntu-latest |
|
steps: |
|
- |
|
name: Set up Docker Buildx |
|
uses: docker/setup-buildx-action@v2 |
|
- |
|
name: Check out code |
|
uses: actions/checkout@v3 |
|
- |
|
name: Login to DockerHub |
|
uses: docker/login-action@v2 |
|
with: |
|
username: ${{ secrets.DOCKERHUB_USERNAME }} |
|
password: ${{ secrets.DOCKERHUB_PASSWORD }} |
|
- |
|
name: Build and push |
|
uses: docker/build-push-action@v3 |
|
with: |
|
context: ./docker/transformers-tensorflow-gpu |
|
build-args: | |
|
REF=main |
|
push: true |
|
tags: huggingface/transformers-tensorflow-gpu |
|
|