Skip to content

Build_TRTLLM_Image

Build_TRTLLM_Image #23

Workflow file for this run

# This workflow will build and push a new container image to Alibaba Cloud Container Registry (ACR),
# and then will deploy it to Alibaba Cloud Container Service for Kubernetes (ACK), when there is a push to the "main" branch.
#
# To use this workflow, you will need to complete the following set-up steps:
#
# 1. Create an ACR repository to store your container images.
# You can use ACR EE instance for more security and better performance.
# For instructions see https://www.alibabacloud.com/help/doc-detail/142168.htm
#
# 2. Create an ACK cluster to run your containerized application.
# You can use ACK Pro cluster for more security and better performance.
# For instructions see https://www.alibabacloud.com/help/doc-detail/95108.htm
#
# 3. Store your AccessKey pair in GitHub Actions secrets named `ACCESS_KEY_ID` and `ACCESS_KEY_SECRET`.
# For instructions on setting up secrets see: https://developer.github.com/actions/managing-workflows/storing-secrets/
#
# 4. Change the values for the REGION_ID, REGISTRY, NAMESPACE, IMAGE, ACK_CLUSTER_ID, and ACK_DEPLOYMENT_NAME.
#
name: Build_TRTLLM_Image
on:
workflow_dispatch:
# push:
# branches: [ "dev" ]
env:
REGION_ID: cn-beijing
IMAGE_ADDR: registry.cn-beijing.aliyuncs.com
jobs:
build:
runs-on: ubuntu-latest
# runs-on: self-hosted
timeout-minutes: 720
steps:
- name: Clean up disk space
run: |
echo -e "\nBefore removing files:"
df -h
sudo rm -rf /usr/share/dotnet /usr/share/swift /usr/share/miniconda /usr/share/az_*
sudo rm -rf /usr/lib/google-cloud-sdk
sudo rm -rf /usr/local/share/powershell /usr/local/share/chromium
sudo rm -rf /usr/local/lib/android /usr/local/lib/node_modules
sudo rm -rf /opt/hostedtoolcache /opt/google /opt/microsoft /opt/az /opt/ghc
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
echo -e "\nAfter removing files:"
df -h
# 1.1 Clone repo
- name: Clone llm-benchmarks
uses: actions/checkout@v4
# 1.2 Build and push image to ACR
- name: Build and push image to ACR
run: |
echo -e "\nWorkspace path:"
pwd
tree -L 1
export AWS_EC2_METADATA_DISABLED=true
docker version
docker login --username=${{ secrets.DOCKER_USERNAME }} --password=${{ secrets.DOCKER_PASSWORD }} ${{ env.IMAGE_ADDR }}
bash scripts/trt_llm/build_docker.sh all