Skip to content

build image with prebuilt lib #33

build image with prebuilt lib

build image with prebuilt lib #33

name: build image with prebuilt lib
on:
workflow_dispatch:
inputs:
imageTag:
description: image tag
required: true
type: string
jobs:
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Free disk space
# https://github.com/actions/virtual-environments/issues/709
run: |
echo "=========original CI disk space"
df -h
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo "=========after clean up, the left CI disk space"
df -h
- name: Checkout code
uses: actions/checkout@v4
- name: Docker Login
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: image=moby/buildkit:master
- name: Build & Pushing hami image
uses: docker/[email protected]
with:
context: .
file: docker/Dockerfile.withlib
platforms: linux/arm64,linux/amd64
build-args: |
VERSION=${{ inputs.imageTag }}
GOLANG_IMAGE=golang:1.24.4-bullseye
NVIDIA_IMAGE=nvidia/cuda:12.2.0-devel-ubuntu20.04
DEST_DIR=/usr/local
tags: beclab/hami:${{ inputs.imageTag }}
push: true