ci: free space on workers for build (#10786)
Co-authored-by: zhyncs <me@zhyncs.com>
This commit is contained in:
77
.github/workflows/release-docker-dev.yml
vendored
77
.github/workflows/release-docker-dev.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build Development Docker Image
|
name: Build and Push Development Docker Images
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -8,7 +8,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build-dev-x86:
|
build-dev-x86:
|
||||||
if: ${{ github.repository == 'sgl-project/sglang' }}
|
if: ${{ github.repository == 'sgl-project/sglang' }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: nvidia
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
variant:
|
variant:
|
||||||
@@ -16,19 +16,22 @@ jobs:
|
|||||||
type: all
|
type: all
|
||||||
tag: dev
|
tag: dev
|
||||||
steps:
|
steps:
|
||||||
|
- name: Delete huge unnecessary tools folder
|
||||||
|
run: rm -rf /opt/hostedtoolcache
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Free disk space
|
- name: Free disk space
|
||||||
uses: jlumbroso/free-disk-space@main
|
uses: jlumbroso/free-disk-space@main
|
||||||
with:
|
with:
|
||||||
tool-cache: false
|
tool-cache: true
|
||||||
docker-images: false
|
docker-images: true
|
||||||
android: true
|
android: true
|
||||||
dotnet: true
|
dotnet: true
|
||||||
haskell: true
|
haskell: true
|
||||||
large-packages: true
|
large-packages: true
|
||||||
swap-storage: false
|
swap-storage: true
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -43,54 +46,9 @@ jobs:
|
|||||||
run: |
|
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 .
|
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:
|
build-blackwell-arm:
|
||||||
if: ${{ github.repository == 'sgl-project/sglang' }}
|
if: ${{ github.repository == 'sgl-project/sglang' }}
|
||||||
runs-on: ubuntu-22.04-arm
|
runs-on: labubu
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
variant:
|
variant:
|
||||||
@@ -98,19 +56,22 @@ jobs:
|
|||||||
type: blackwell_aarch
|
type: blackwell_aarch
|
||||||
tag: blackwell-cu129
|
tag: blackwell-cu129
|
||||||
steps:
|
steps:
|
||||||
|
- name: Delete huge unnecessary tools folder
|
||||||
|
run: rm -rf /opt/hostedtoolcache
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Free disk space
|
- name: Free disk space
|
||||||
uses: jlumbroso/free-disk-space@main
|
uses: jlumbroso/free-disk-space@main
|
||||||
with:
|
with:
|
||||||
tool-cache: false
|
tool-cache: true
|
||||||
docker-images: false
|
docker-images: true
|
||||||
android: true
|
android: true
|
||||||
dotnet: true
|
dotnet: true
|
||||||
haskell: true
|
haskell: true
|
||||||
large-packages: true
|
large-packages: true
|
||||||
swap-storage: false
|
swap-storage: true
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
@@ -128,14 +89,14 @@ jobs:
|
|||||||
|
|
||||||
create-manifests:
|
create-manifests:
|
||||||
runs-on: ubuntu-22.04
|
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' }}
|
if: ${{ github.repository == 'sgl-project/sglang' }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
variant:
|
variant:
|
||||||
- tag: blackwell-cu129
|
- tag: dev
|
||||||
x86_tag: blackwell-cu129-x86
|
x86_tag: dev-x86
|
||||||
arm64_tag: blackwell-cu129-arm64
|
arm64_tag: dev-arm64
|
||||||
steps:
|
steps:
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
- uses: docker/login-action@v2
|
- uses: docker/login-action@v2
|
||||||
|
|||||||
4
.github/workflows/release-docker.yml
vendored
4
.github/workflows/release-docker.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
|||||||
build_type: 'blackwell'
|
build_type: 'blackwell'
|
||||||
- cuda_version: '12.9.1'
|
- cuda_version: '12.9.1'
|
||||||
build_type: 'blackwell'
|
build_type: 'blackwell'
|
||||||
runs-on: ubuntu-latest
|
runs-on: nvidia
|
||||||
steps:
|
steps:
|
||||||
- name: Delete huge unnecessary tools folder
|
- name: Delete huge unnecessary tools folder
|
||||||
run: rm -rf /opt/hostedtoolcache
|
run: rm -rf /opt/hostedtoolcache
|
||||||
@@ -88,7 +88,7 @@ jobs:
|
|||||||
variant:
|
variant:
|
||||||
- cuda_version: '12.9.1'
|
- cuda_version: '12.9.1'
|
||||||
build_type: 'blackwell_aarch'
|
build_type: 'blackwell_aarch'
|
||||||
runs-on: ubuntu-22.04-arm
|
runs-on: labubu
|
||||||
steps:
|
steps:
|
||||||
- name: Delete huge unnecessary tools folder
|
- name: Delete huge unnecessary tools folder
|
||||||
run: rm -rf /opt/hostedtoolcache
|
run: rm -rf /opt/hostedtoolcache
|
||||||
|
|||||||
@@ -90,12 +90,12 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel html5li
|
|||||||
fi \
|
fi \
|
||||||
&& python3 -m pip install --no-cache-dir -e "python[${BUILD_TYPE}]" --extra-index-url https://download.pytorch.org/whl/cu${CUINDEX} \
|
&& python3 -m pip install --no-cache-dir -e "python[${BUILD_TYPE}]" --extra-index-url https://download.pytorch.org/whl/cu${CUINDEX} \
|
||||||
&& python3 -m pip install --no-cache-dir nvidia-nccl-cu12==2.27.6 --force-reinstall --no-deps \
|
&& python3 -m pip install --no-cache-dir nvidia-nccl-cu12==2.27.6 --force-reinstall --no-deps \
|
||||||
&& python3 -m flashinfer --download-cubin
|
&& FLASHINFER_LOGGING_LEVEL=warning python3 -m flashinfer --download-cubin
|
||||||
|
|
||||||
|
|
||||||
# Download source files
|
# Download source files
|
||||||
RUN wget https://developer.download.nvidia.com/compute/redist/nvshmem/3.3.9/source/nvshmem_src_cuda12-all-all-3.3.9.tar.gz && \
|
RUN wget https://developer.download.nvidia.com/compute/redist/nvshmem/3.3.9/source/nvshmem_src_cuda12-all-all-3.3.9.tar.gz && \
|
||||||
if [ "$BUILD_TYPE" = "blackwell" ] && [ "$(uname -m)" = "aarch64" ]; then \
|
if [ "$BUILD_TYPE" = "blackwell_aarch" ] && [ "$(uname -m)" = "aarch64" ]; then \
|
||||||
git clone https://github.com/fzyzcjy/DeepEP.git \
|
git clone https://github.com/fzyzcjy/DeepEP.git \
|
||||||
&& cd DeepEP && git checkout 1b14ad661c7640137fcfe93cccb2694ede1220b0 && sed -i 's/#define NUM_CPU_TIMEOUT_SECS 100/#define NUM_CPU_TIMEOUT_SECS 1000/' csrc/kernels/configs.cuh && cd .. ; \
|
&& cd DeepEP && git checkout 1b14ad661c7640137fcfe93cccb2694ede1220b0 && sed -i 's/#define NUM_CPU_TIMEOUT_SECS 100/#define NUM_CPU_TIMEOUT_SECS 1000/' csrc/kernels/configs.cuh && cd .. ; \
|
||||||
else \
|
else \
|
||||||
|
|||||||
Reference in New Issue
Block a user