feat(pack): add Enflame GCU (燧原 S60) backend support#248
feat(pack): add Enflame GCU (燧原 S60) backend support#248huqingjie0118-droid wants to merge 2 commits into
Conversation
- Add pack/gcu/Dockerfile: combined vanilla/runtime/vllm stages - Add pack/gcu/Dockerfile.vllm: per-service vLLM Dockerfile - Update pack/matrix.yaml: add gcu backend rule - Version: TopsRider 3.7.107, vLLM 0.11.0, Python 3.10, Ubuntu 22.04
📋 Version Information for GPUStack Team
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for the Enflame GCU (燧原 S60) backend to the GPUStack runner pack system, adding Dockerfiles for runtime and vLLM stages, documentation, and matrix configuration. The reviewer provided several actionable suggestions to improve the Dockerfiles and repository structure. Key feedback includes fixing a critical issue in pack/gcu/Dockerfile where the vllm stage was built directly from the vanilla image instead of the runtime stage (which would cause missing dependencies like tini and uv), removing an accidentally committed PR_TEMPLATE.md file, renaming ISSUE_TEMPLATE.md to README.md for better documentation, adding retry flags to curl commands, using python3 -m pip instead of pip, ensuring consistent removal of pip.conf, and cleaning up /var/lib/apt/lists/* to reduce Docker image sizes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Stage: vllm | ||
| # ============================================================ | ||
|
|
||
| FROM ${VLLM_BASE_IMAGE} AS vllm |
There was a problem hiding this comment.
The vllm stage should be built on top of the runtime stage rather than VLLM_BASE_IMAGE (which defaults to the raw VANILLA_IMAGE). If built directly from the vanilla image, the final image will lack the essential tools installed in the runtime stage (such as tini, which is used as the entrypoint, and uv, which is used in the postprocess step). This will cause the build to fail at the uv pip tree step, or fail at runtime due to a missing tini executable.
FROM runtime AS vllm
| @@ -0,0 +1,86 @@ | |||
| # feat(pack): add Enflame GCU (燧原 S60) backend support | |||
| @@ -0,0 +1,85 @@ | |||
| # Enflame GCU (燧原 S60) Backend Support Request | |||
There was a problem hiding this comment.
This file contains valuable documentation about the Enflame GCU backend, including supported models, build instructions, and expected tags. However, naming it ISSUE_TEMPLATE.md inside the pack/gcu/ directory is non-standard and confusing. It should be renamed to README.md to serve as the developer documentation for this backend.
| # Update alternatives | ||
| if [[ -f /etc/alternatives/python3 ]]; then update-alternatives --remove-all python3; fi; update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 | ||
| if [[ -f /etc/alternatives/python ]]; then update-alternatives --remove-all python; fi; update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 | ||
| curl -sS "https://bootstrap.pypa.io/get-pip.py" | python${PYTHON_VERSION} |
There was a problem hiding this comment.
|
|
||
| if [[ -f /etc/alternatives/python3 ]]; then update-alternatives --remove-all python3; fi; update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 | ||
| if [[ -f /etc/alternatives/python ]]; then update-alternatives --remove-all python; fi; update-alternatives --install /usr/bin/python python /usr/bin/python${PYTHON_VERSION} 1 | ||
| curl -sS "https://bootstrap.pypa.io/get-pip.py" | python${PYTHON_VERSION} |
| pipx<=1.8.0 | ||
| uv<=0.9.11 | ||
| EOT | ||
| pip install -r /tmp/requirements.txt |
| pipx<=1.8.0 | ||
| uv<=0.9.11 | ||
| EOT | ||
| pip install -r /tmp/requirements.txt |
| RUN <<EOF | ||
| # Buildkit | ||
|
|
||
| cat <<EOT >/tmp/requirements.txt |
There was a problem hiding this comment.
To ensure consistency with Dockerfile.vllm and prevent any pre-configured pip mirrors or settings in the base image from interfering with the build, remove any existing pip.conf files before installing requirements.
RUN <<EOF
# Buildkit
rm -rf /root/.pip/pip.conf /etc/pip.conf
cat <<EOT >/tmp/requirements.txt
| # Cleanup | ||
| rm -rf /var/tmp/* \ | ||
| && rm -rf /tmp/* \ | ||
| && rm -rf /var/cache/apt |
There was a problem hiding this comment.
To minimize the Docker image size, it is highly recommended to clean up the apt package lists in /var/lib/apt/lists/* in addition to /var/cache/apt. Please apply this cleanup to all apt-get blocks in both Dockerfile and Dockerfile.vllm.
# Cleanup
rm -rf /var/tmp/* \
&& rm -rf /tmp/* \
&& rm -rf /var/cache/apt \
&& rm -rf /var/lib/apt/lists/*
feat(pack): add Enflame GCU (燧原 S60) backend support
Summary
Add Dockerfile support for Enflame GCU (燧原 S60) to the GPUStack runner pack system.
Changes
pack/gcu/Dockerfile— Combined build with vanilla → runtime → vllm stagesDockerfile.vllm— Per-service vLLM Dockerfile (runtime + vllm targets)pack/matrix.yaml— Addedgcubackend ruleVersion Information
Vanilla Image
This image is provided by Enflame and includes:
torch_gcu(PyTorch for GCU)vllm-gcu(vLLM with GCU backend)triton_gcuExpected Image Tags
After the copy.yml workflow runs and the Dockerfiles are built:
gpustack/runner:gcu3.7.107-python3.10-vanillagpustack/runner:gcu3.7.107-python3.10gpustack/runner:gcu3.7.107-vllm0.11.0-python3.10copy.yml Parameters
For the GitHub Action
copy.yml, the suggested inputs:Build & Test
To build the runtime image locally:
To build the vLLM image:
Notes
GCU_VISIBLE_DEVICESRAY_EXPERIMENTAL_NOSET_GCU_VISIBLE_DEVICES=1in entrypointRelated