ci: free space on workers for build (#10786)

Co-authored-by: zhyncs <me@zhyncs.com>
This commit is contained in:
ishandhanani
2025-09-24 17:58:22 +08:00
committed by GitHub
parent cd641a995c
commit adba172fd1
3 changed files with 23 additions and 62 deletions

View File

@@ -1,4 +1,4 @@
name: Build Development Docker Image
name: Build and Push Development Docker Images
on:
workflow_dispatch:
@@ -8,7 +8,7 @@ on:
jobs:
build-dev-x86:
if: ${{ github.repository == 'sgl-project/sglang' }}
runs-on: ubuntu-22.04
runs-on: nvidia
strategy:
matrix:
variant:
@@ -16,19 +16,22 @@ jobs:
type: all
tag: dev
steps:
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
docker-images: false
tool-cache: true
docker-images: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: false
swap-storage: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -43,54 +46,9 @@ jobs:
run: |
docker buildx build --platform linux/amd64 --push -f docker/Dockerfile --build-arg CUDA_VERSION=${{ matrix.variant.version }} --build-arg BUILD_TYPE=${{ matrix.variant.type }} --build-arg CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) -t lmsysorg/sglang:${{ matrix.variant.tag }} --no-cache .
build-blackwell-x86:
if: ${{ github.repository == 'sgl-project/sglang' }}
runs-on: ubuntu-latest
strategy:
matrix:
variant:
- version: 12.8.1
type: blackwell
tag: blackwell
- version: 12.9.1
type: blackwell
tag: blackwell-cu129
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
docker-images: false
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Blackwell Image (x86)
run: |
if [ "${{ matrix.variant.version }}" = "12.9.1" ]; then
docker buildx build --platform linux/amd64 --push -f docker/Dockerfile --build-arg CUDA_VERSION=${{ matrix.variant.version }} --build-arg BUILD_TYPE=${{ matrix.variant.type }} --build-arg CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) -t lmsysorg/sglang:${{ matrix.variant.tag }}-x86 --no-cache .
else
docker buildx build --platform linux/amd64 --push -f docker/Dockerfile --build-arg CUDA_VERSION=${{ matrix.variant.version }} --build-arg BUILD_TYPE=${{ matrix.variant.type }} --build-arg CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) -t lmsysorg/sglang:${{ matrix.variant.tag }} --no-cache .
fi
build-blackwell-arm:
if: ${{ github.repository == 'sgl-project/sglang' }}
runs-on: ubuntu-22.04-arm
runs-on: labubu
strategy:
matrix:
variant:
@@ -98,19 +56,22 @@ jobs:
type: blackwell_aarch
tag: blackwell-cu129
steps:
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
docker-images: false
tool-cache: true
docker-images: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: false
swap-storage: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -128,14 +89,14 @@ jobs:
create-manifests:
runs-on: ubuntu-22.04
needs: [build-blackwell-x86, build-blackwell-arm]
needs: [build-dev-x86, build-blackwell-arm]
if: ${{ github.repository == 'sgl-project/sglang' }}
strategy:
matrix:
variant:
- tag: blackwell-cu129
x86_tag: blackwell-cu129-x86
arm64_tag: blackwell-cu129-arm64
- tag: dev
x86_tag: dev-x86
arm64_tag: dev-arm64
steps:
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v2

View File

@@ -20,7 +20,7 @@ jobs:
build_type: 'blackwell'
- cuda_version: '12.9.1'
build_type: 'blackwell'
runs-on: ubuntu-latest
runs-on: nvidia
steps:
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache
@@ -88,7 +88,7 @@ jobs:
variant:
- cuda_version: '12.9.1'
build_type: 'blackwell_aarch'
runs-on: ubuntu-22.04-arm
runs-on: labubu
steps:
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache