Setup workflow for releasing mi300x and mi350x dockers. (#8035)
This commit is contained in:
37
.github/workflows/release-docker-amd-nightly.yml
vendored
37
.github/workflows/release-docker-amd-nightly.yml
vendored
@@ -15,11 +15,11 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
if: github.repository == 'sgl-project/sglang'
|
if: github.repository == 'sgl-project/sglang'
|
||||||
runs-on: amd-docker
|
runs-on: amd-docker-scale
|
||||||
environment: 'prod'
|
environment: 'prod'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rocm_version: ['6.3.0']
|
gpu_arch: ['gfx942', 'gfx950']
|
||||||
build_type: ['all', 'srt']
|
build_type: ['all', 'srt']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -29,17 +29,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
|
echo "DATE=$(date +%Y%m%d)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- 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: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -48,6 +37,19 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and Push
|
- name: Build and Push
|
||||||
run: |
|
run: |
|
||||||
|
version=$(cat python/sglang/version.py | cut -d'"' -f2)
|
||||||
|
|
||||||
|
if [ "${{ matrix.gpu_arch }}" = "gfx942" ]; then
|
||||||
|
rocm_tag="rocm630-mi30x"
|
||||||
|
elif [ "${{ matrix.gpu_arch }}" = "gfx950" ]; then
|
||||||
|
rocm_tag="rocm700-mi35x"
|
||||||
|
else
|
||||||
|
echo "Unsupported gfx arch"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
tag=v${version}-${rocm_tag}
|
||||||
|
|
||||||
if [ "${{ matrix.build_type }}" = "all" ]; then
|
if [ "${{ matrix.build_type }}" = "all" ]; then
|
||||||
tag_suffix=""
|
tag_suffix=""
|
||||||
elif [ "${{ matrix.build_type }}" = "srt" ]; then
|
elif [ "${{ matrix.build_type }}" = "srt" ]; then
|
||||||
@@ -57,10 +59,5 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker build . -f docker/Dockerfile.rocm --build-arg BUILD_TYPE=${{ matrix.build_type }} -t rocm/sgl-dev:${{ env.DATE }}${tag_suffix} --no-cache
|
docker build . -f docker/Dockerfile.rocm --build-arg BUILD_TYPE=${{ matrix.build_type }} --build-arg GPU_ARCH=${{ matrix.gpu_arch }} -t rocm/sgl-dev:${tag}-${{ env.DATE }}${tag_suffix} --no-cache
|
||||||
docker push rocm/sgl-dev:${{ env.DATE }}${tag_suffix}
|
docker push rocm/sgl-dev:${tag}-${{ env.DATE }}${tag_suffix}
|
||||||
|
|
||||||
- name: "Remove docker image"
|
|
||||||
run: |
|
|
||||||
sudo rm -rf /var/lib/docker
|
|
||||||
sudo systemctl restart docker
|
|
||||||
|
|||||||
25
.github/workflows/release-docker-amd.yml
vendored
25
.github/workflows/release-docker-amd.yml
vendored
@@ -10,27 +10,16 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
if: github.repository == 'sgl-project/sglang'
|
if: github.repository == 'sgl-project/sglang'
|
||||||
runs-on: amd-docker
|
runs-on: amd-docker-scale
|
||||||
environment: 'prod'
|
environment: 'prod'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rocm_version: ['6.3.0']
|
gpu_arch: ['gfx942', 'gfx950']
|
||||||
build_type: ['all', 'srt']
|
build_type: ['all', 'srt']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
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: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
@@ -41,10 +30,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
version=$(cat python/sglang/version.py | cut -d'"' -f2)
|
version=$(cat python/sglang/version.py | cut -d'"' -f2)
|
||||||
|
|
||||||
if [ "${{ matrix.rocm_version }}" = "6.3.0" ]; then
|
if [ "${{ matrix.gpu_arch }}" = "gfx942" ]; then
|
||||||
rocm_tag="rocm630"
|
rocm_tag="rocm630-mi30x"
|
||||||
|
elif [ "${{ matrix.gpu_arch }}" = "gfx950" ]; then
|
||||||
|
rocm_tag="rocm700-mi35x"
|
||||||
else
|
else
|
||||||
echo "Unsupported ROCm version"
|
echo "Unsupported gfx arch"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -59,5 +50,5 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker build . -f docker/Dockerfile.rocm --build-arg BUILD_TYPE=${{ matrix.build_type }} -t lmsysorg/sglang:${tag}${tag_suffix} --no-cache
|
docker build . -f docker/Dockerfile.rocm --build-arg BUILD_TYPE=${{ matrix.build_type }} --build-arg GPU_ARCH=${{ matrix.gpu_arch }} -t lmsysorg/sglang:${tag}${tag_suffix} --no-cache
|
||||||
docker push lmsysorg/sglang:${tag}${tag_suffix}
|
docker push lmsysorg/sglang:${tag}${tag_suffix}
|
||||||
|
|||||||
Reference in New Issue
Block a user