Skip to content

Build Docker for CD

Build Docker for CD #1

# GH actions.
name: Build Docker for packaging
on:
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Reclaim disk space
run: |
df -h
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/.ghcup
df -h
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.MLCAI_DOCKERHUB_USERNAME }}
password: ${{ secrets.MLCAI_DOCKERHUB_TOKEN }}
- name: Docker CPU
run: |
set -eux
cd docker-cd
docker build -t package-cpu -f Dockerfile.cpu .
- name: Docker CUDA 11.7
run: |
set -eux
cd docker-cd
docker build -t package-cu117 -f Dockerfile.cu117 .
- name: Docker CUDA 11.8
run: |
set -eux
cd docker-cd
docker build -t package-cu118 -f Dockerfile.cu118 .
- name: Docker CUDA 12.1
run: |
set -eux
cd docker-cd
docker build -t package-cu121 -f Dockerfile.cu121 .
- name: Docker CUDA 12.2
run: |
set -eux
cd docker-cd
docker build -t package-cu122 -f Dockerfile.cu122 .
- name: Docker ROCm 5.6
run: |
set -eux
cd docker-cd
docker build -t package-rocm56 -f Dockerfile.rocm56 .
- name: Docker ROCm 5.7
run: |
set -eux
cd docker-cd
docker build -t package-rocm57 -f Dockerfile.rocm57 .
# - name: Upload to Docker Hub
# if: ${{ github.ref == 'refs/heads/main' }}
# run: |
# set -eux
# NEW_TAG=$(git log -1 --format='%h')
# docker tag package-${{ matrix.platform }} mlcaidev/package-${{ matrix.platform }}:$NEW_TAG
# docker push mlcaidev/package-${{ matrix.platform }}:$NEW_TAG