fix aiter
This commit is contained in:
30
Dockerfile
30
Dockerfile
@@ -1,12 +1,29 @@
|
|||||||
FROM lmsysorg/sglang-rocm:v0.5.10rc0-rocm700-mi30x-20260411
|
FROM lmsysorg/sglang-rocm:v0.5.10rc0-rocm700-mi30x-20260411
|
||||||
|
|
||||||
# Replace the vllm binary with our shim so no matter how the
|
# ---------------------------------------------------------------
|
||||||
# production stack invokes vllm, we intercept it
|
# Fix aiter — try pip upgrade first, fall back to source build
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
RUN pip install --upgrade aiter || \
|
||||||
|
( \
|
||||||
|
echo "=== pip upgrade failed, building aiter from source ===" && \
|
||||||
|
pip uninstall -y aiter || true && \
|
||||||
|
pip install psutil pybind11 flydsl==0.0.1.dev95158637 && \
|
||||||
|
git clone --recursive https://github.com/ROCm/aiter.git /tmp/aiter && \
|
||||||
|
cd /tmp/aiter && \
|
||||||
|
git checkout v0.1.11.post1 && \
|
||||||
|
git submodule sync && \
|
||||||
|
git submodule update --init --recursive && \
|
||||||
|
PREBUILD_KERNELS=1 GPU_ARCHS=gfx942 python3 setup.py install && \
|
||||||
|
cd / && rm -rf /tmp/aiter \
|
||||||
|
)
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# Replace the vllm binary with our shim
|
||||||
|
# ---------------------------------------------------------------
|
||||||
COPY vllm-shim.sh /usr/local/bin/vllm
|
COPY vllm-shim.sh /usr/local/bin/vllm
|
||||||
RUN chmod +x /usr/local/bin/vllm
|
RUN chmod +x /usr/local/bin/vllm
|
||||||
|
|
||||||
# Also handle `python -m vllm.entrypoints.openai.api_server` and
|
# Shadow `python -m vllm.*` invocations
|
||||||
# `python -m vllm.entrypoints.cli.main` by shadowing the vllm package
|
|
||||||
RUN mkdir -p /opt/vllm-shim/vllm/entrypoints/openai \
|
RUN mkdir -p /opt/vllm-shim/vllm/entrypoints/openai \
|
||||||
/opt/vllm-shim/vllm/entrypoints/cli
|
/opt/vllm-shim/vllm/entrypoints/cli
|
||||||
COPY vllm_shim_module.py /opt/vllm-shim/vllm/__main__.py
|
COPY vllm_shim_module.py /opt/vllm-shim/vllm/__main__.py
|
||||||
@@ -17,9 +34,12 @@ RUN touch /opt/vllm-shim/vllm/__init__.py \
|
|||||||
/opt/vllm-shim/vllm/entrypoints/openai/__init__.py \
|
/opt/vllm-shim/vllm/entrypoints/openai/__init__.py \
|
||||||
/opt/vllm-shim/vllm/entrypoints/cli/__init__.py
|
/opt/vllm-shim/vllm/entrypoints/cli/__init__.py
|
||||||
|
|
||||||
# Prepend shim to PYTHONPATH so it shadows any real vllm install
|
|
||||||
ENV PYTHONPATH="/opt/vllm-shim:${PYTHONPATH}"
|
ENV PYTHONPATH="/opt/vllm-shim:${PYTHONPATH}"
|
||||||
|
|
||||||
|
# ---------------------------------------------------------------
|
||||||
|
# MI300X tuning
|
||||||
|
# ---------------------------------------------------------------
|
||||||
ENV HIP_FORCE_DEV_KERNARG=1
|
ENV HIP_FORCE_DEV_KERNARG=1
|
||||||
ENV NCCL_MIN_NCHANNELS=112
|
ENV NCCL_MIN_NCHANNELS=112
|
||||||
ENV GPU_MAX_HW_QUEUES=2
|
ENV GPU_MAX_HW_QUEUES=2
|
||||||
|
ENV SGLANG_USE_AITER=1
|
||||||
Reference in New Issue
Block a user