Skip to content

Publish devel image #24

Publish devel image

Publish devel image #24

name: Publish devel image
on:
workflow_dispatch:
inputs:
push:
description: 'Push to Docker Hub'
required: false
default: 'true'
# Schedule the workflow to run at 10:00 (UTC) every month.
schedule:
# Minute[0,59] Hour[0,23] Day of month[1,31] Month[1,12] Day of week[0,6] (Sunday=0)
- cron: '0 10 1 * *'
env:
# Tells where to store caches.
CI_CACHE_DIR: ${{ github.workspace }}/../../ci_cache
jobs:
publish_devel_image:
strategy:
fail-fast: false
matrix:
cuda: ["11.8", "12.1", "12.4", "12.6"]
runs-on: [self-hosted, linux, build]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Create cache directory
run: mkdir -p $CI_CACHE_DIR/.buildx-cache
- name: Build devel image for cuda ${{ matrix.cuda }}
uses: docker/build-push-action@v5
with:
context: ./docker
file: ./docker/Dockerfile.devel
push: ${{ inputs.push || 'true' }}
cache-from: type=local,src=$CI_CACHE_DIR/.buildx-cache
cache-to: type=local,dest=$CI_CACHE_DIR/.buildx-cache
build-args: |
UBUNTU_VERSION=22.04
CUDA_VERSION=${{ matrix.cuda }}
GCC_VERSION=12
tags: |
vectorchai/scalellm_devel:cuda${{ matrix.cuda }}-ubuntu22.04
vectorchai/scalellm_devel:cuda${{ matrix.cuda }}