Skip to content

Build Docker for CD

Build Docker for CD #5

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: Show tags
run: |
TAG=$(git log -1 --format='%h')
echo "TAG=$TAG"
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.MLCAI_DOCKERHUB_USERNAME }}
password: ${{ secrets.MLCAI_DOCKERHUB_TOKEN }}
- name: CPU - Build
run: |
cd docker-cd
docker build --rm -t package-cpu -f Dockerfile.cpu .
- name: CPU - Upload
run: |
bash ./docker-cd/scripts/docker-push.sh "cpu"
- name: CUDA 11.7 - Build
run: |
cd docker-cd && docker build --rm --build-arg CUDA_NAME_PGK="cuda-11-7" --build-arg CUDA_NAME_TXT="cuda11.7" -t package-cu117 -f Dockerfile.cuda .
- name: CUDA 11.7 - Upload
run: |
bash ./docker-cd/scripts/docker-push.sh "cu117"
- name: CUDA 11.8 - Build
run: |
cd docker-cd && docker build --rm --build-arg CUDA_NAME_PGK="cuda-11-8" --build-arg CUDA_NAME_TXT="cuda11.8" -t package-cu118 -f Dockerfile.cuda .
- name: CUDA 11.8 - Upload
run: |
bash ./docker-cd/scripts/docker-push.sh "cu118"
- name: CUDA 12.1 - Build
run: |
cd docker-cd && docker build --rm --build-arg CUDA_NAME_PGK="cuda-12-1" --build-arg CUDA_NAME_TXT="cuda12.1" -t package-cu121 -f Dockerfile.cuda .
- name: CUDA 12.1 - Upload
run: |
bash ./docker-cd/scripts/docker-push.sh "cu121"
- name: CUDA 12.2 - Build
run: |
cd docker-cd && docker build --rm --build-arg CUDA_NAME_PGK="cuda-12-2" --build-arg CUDA_NAME_TXT="cuda12.2" -t package-cu122 -f Dockerfile.cuda .
- name: CUDA 12.2 - Upload
run: |
bash ./docker-cd/scripts/docker-push.sh "cu122"
- name: ROCm 5.6 - Build
run: |
cd docker-cd && docker build --rm --build-arg ROCM_VER="5.6" -t package-rocm56 -f Dockerfile.rocm .
- name: ROCm 5.6 - Upload
run: |
bash ./docker-cd/scripts/docker-push.sh "rocm56"
- name: ROCm 5.7 - Build
run: |
cd docker-cd && docker build --rm --build-arg ROCM_VER="5.7" -t package-rocm57 -f Dockerfile.rocm .
- name: ROCm 5.7 - Upload
run: |
bash ./docker-cd/scripts/docker-push.sh "rocm57"