[AMD] Merge Dockerfiles for ROCm (#19203)

Co-authored-by: bingxche <Bingxu.Chen@amd.com>
This commit is contained in:
Alan Kao
2026-02-27 16:53:51 +08:00
committed by GitHub
parent 43fade5f69
commit 9b2fbf7e6a
6 changed files with 162 additions and 551 deletions

View File

@@ -15,7 +15,7 @@ on:
# - "test/**"
# - "sgl-kernel/**"
# - ".github/workflows/pr-test-amd-rocm720.yml"
# - "docker/rocm720.Dockerfile"
# - "docker/rocm.Dockerfile"
# pull_request:
# branches: [ main ]
# paths:
@@ -24,7 +24,7 @@ on:
# - "test/**"
# - "sgl-kernel/**"
# - ".github/workflows/pr-test-amd-rocm720.yml"
# - "docker/rocm720.Dockerfile"
# - "docker/rocm.Dockerfile"
workflow_dispatch:
inputs:
target_stage:

View File

@@ -78,5 +78,5 @@ jobs:
tag=v${version}-${rocm_tag}
docker build . -f docker/rocm720.Dockerfile --build-arg SGL_BRANCH=${{ github.ref_name }} --build-arg BUILD_TYPE=${{ matrix.build_type }} --build-arg GPU_ARCH=${{ matrix.gpu_arch }} --build-arg ENABLE_MORI=1 --build-arg NIC_BACKEND=ainic --build-arg SETUPTOOLS_SCM_PRETEND_VERSION=${pretend_version} -t rocm/sgl-dev:${tag}-${{ env.DATE }} --no-cache
docker build . -f docker/rocm.Dockerfile --build-arg SGL_BRANCH=${{ github.ref_name }} --build-arg BUILD_TYPE=${{ matrix.build_type }} --build-arg GPU_ARCH=${{ matrix.gpu_arch }} --build-arg ENABLE_MORI=1 --build-arg NIC_BACKEND=ainic --build-arg SETUPTOOLS_SCM_PRETEND_VERSION=${pretend_version} -t rocm/sgl-dev:${tag}-${{ env.DATE }} --no-cache
docker push rocm/sgl-dev:${tag}-${{ env.DATE }}

View File

@@ -56,10 +56,8 @@ jobs:
version=${{ steps.version.outputs.version }}
echo "Version: ${version}"
dockerfile=""
gpu_arch_suffix=""
if [ "${{ matrix.rocm_version }}" = "rocm700" ]; then
dockerfile="docker/rocm.Dockerfile"
if [ "${{ matrix.gpu_arch }}" = "gfx942" ]; then
rocm_tag="rocm700-mi30x"
elif [ "${{ matrix.gpu_arch }}" = "gfx950" ]; then
@@ -70,7 +68,6 @@ jobs:
fi
elif [ "${{ matrix.rocm_version }}" = "rocm720" ]; then
gpu_arch_suffix="-${{ matrix.rocm_version }}"
dockerfile="docker/rocm720.Dockerfile"
if [ "${{ matrix.gpu_arch }}" = "gfx942" ]; then
rocm_tag="rocm720-mi30x"
elif [ "${{ matrix.gpu_arch }}" = "gfx950" ]; then
@@ -87,5 +84,5 @@ jobs:
tag=v${version}-${rocm_tag}
# rocm.Dockerfile expects SGL_BRANCH with 'v' prefix for git tag checkout
docker build . -f ${dockerfile} --build-arg BUILD_TYPE=${{ matrix.build_type }} --build-arg GPU_ARCH=${{ matrix.gpu_arch }}${gpu_arch_suffix} --build-arg SGL_BRANCH=v${version} --build-arg ENABLE_MORI=1 --build-arg NIC_BACKEND=ainic -t lmsysorg/sglang:${tag} --no-cache
docker build . -f docker/rocm.Dockerfile --build-arg BUILD_TYPE=${{ matrix.build_type }} --build-arg GPU_ARCH=${{ matrix.gpu_arch }}${gpu_arch_suffix} --build-arg SGL_BRANCH=v${version} --build-arg ENABLE_MORI=1 --build-arg NIC_BACKEND=ainic -t lmsysorg/sglang:${tag} --no-cache
docker push lmsysorg/sglang:${tag}