Fix CUDA 12 Docker dependency resolution (#30858)
This commit is contained in:
@@ -239,6 +239,11 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
|||||||
&& echo '__version__ = "0.0.0"' > sglang/version.py \
|
&& echo '__version__ = "0.0.0"' > sglang/version.py \
|
||||||
&& touch README.md \
|
&& touch README.md \
|
||||||
&& touch LICENSE \
|
&& touch LICENSE \
|
||||||
|
&& if [ "${CUDA_VERSION%%.*}" = "12" ]; then \
|
||||||
|
sed -i 's/cuda-python>=13\.0/cuda-python>=12,<13/' pyproject.toml && \
|
||||||
|
sed -i 's/flashinfer_python\[cu13\]/flashinfer_python[cu12]/' pyproject.toml && \
|
||||||
|
sed -i 's/nvidia-cutlass-dsl\[cu13\]/nvidia-cutlass-dsl/' pyproject.toml; \
|
||||||
|
fi \
|
||||||
&& python3 -m pip install --extra-index-url https://download.pytorch.org/whl/cu${CUINDEX} ".[${BUILD_TYPE}]" \
|
&& python3 -m pip install --extra-index-url https://download.pytorch.org/whl/cu${CUINDEX} ".[${BUILD_TYPE}]" \
|
||||||
&& if [ "${CUDA_VERSION%%.*}" = "12" ]; then \
|
&& if [ "${CUDA_VERSION%%.*}" = "12" ]; then \
|
||||||
pip list --format=freeze | awk -F'==' '/-cu13(==|$)/ {print $1}' \
|
pip list --format=freeze | awk -F'==' '/-cu13(==|$)/ {print $1}' \
|
||||||
@@ -669,6 +674,11 @@ RUN if [ "$BRANCH_TYPE" = "local" ]; then \
|
|||||||
# Clean up __pycache__/tests/pyc in same RUN to avoid writing ~28k files to layer
|
# Clean up __pycache__/tests/pyc in same RUN to avoid writing ~28k files to layer
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
cd /sgl-workspace/sglang \
|
cd /sgl-workspace/sglang \
|
||||||
|
&& if [ "${CUDA_VERSION%%.*}" = "12" ]; then \
|
||||||
|
sed -i 's/cuda-python>=13\.0/cuda-python>=12,<13/' python/pyproject.toml && \
|
||||||
|
sed -i 's/flashinfer_python\[cu13\]/flashinfer_python[cu12]/' python/pyproject.toml && \
|
||||||
|
sed -i 's/nvidia-cutlass-dsl\[cu13\]/nvidia-cutlass-dsl/' python/pyproject.toml; \
|
||||||
|
fi \
|
||||||
&& python3 -m pip install --no-deps -e "python[${BUILD_TYPE}]" \
|
&& python3 -m pip install --no-deps -e "python[${BUILD_TYPE}]" \
|
||||||
&& kernels lock python \
|
&& kernels lock python \
|
||||||
&& ( success=0; \
|
&& ( success=0; \
|
||||||
|
|||||||
Reference in New Issue
Block a user