Skip to content

Commit c138025

Browse files
authored
misc: update sagemaker Dockerfile (#5341)
1 parent b62e7e9 commit c138025

File tree

1 file changed

+1
-73
lines changed

1 file changed

+1
-73
lines changed

docker/Dockerfile.sagemaker

Lines changed: 1 addition & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,4 @@
1-
ARG CUDA_VERSION=12.5.1
2-
3-
FROM nvcr.io/nvidia/tritonserver:24.04-py3-min
4-
5-
ARG BUILD_TYPE=all
6-
ENV DEBIAN_FRONTEND=noninteractive
7-
8-
RUN echo 'tzdata tzdata/Areas select America' | debconf-set-selections \
9-
&& echo 'tzdata tzdata/Zones/America select Los_Angeles' | debconf-set-selections \
10-
&& apt update -y \
11-
&& apt install software-properties-common -y \
12-
&& add-apt-repository ppa:deadsnakes/ppa -y && apt update \
13-
&& apt install python3.10 python3.10-dev -y \
14-
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 \
15-
&& update-alternatives --set python3 /usr/bin/python3.10 && apt install python3.10-distutils -y \
16-
&& apt install curl git sudo libibverbs-dev -y \
17-
&& apt install -y rdma-core infiniband-diags openssh-server perftest ibverbs-providers libibumad3 libibverbs1 libnl-3-200 libnl-route-3-200 librdmacm1 \
18-
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py \
19-
&& python3 --version \
20-
&& python3 -m pip --version \
21-
&& rm -rf /var/lib/apt/lists/* \
22-
&& apt clean
23-
24-
# For openbmb/MiniCPM models
25-
RUN pip3 install datamodel_code_generator
26-
27-
WORKDIR /sgl-workspace
28-
29-
ARG CUDA_VERSION
30-
RUN python3 -m pip install --upgrade pip setuptools wheel html5lib six \
31-
&& git clone --depth=1 https://github.com/sgl-project/sglang.git \
32-
&& if [ "$CUDA_VERSION" = "12.1.1" ]; then \
33-
python3 -m pip install torch --index-url https://download.pytorch.org/whl/cu121; \
34-
elif [ "$CUDA_VERSION" = "12.4.1" ]; then \
35-
python3 -m pip install torch --index-url https://download.pytorch.org/whl/cu124; \
36-
elif [ "$CUDA_VERSION" = "12.5.1" ]; then \
37-
python3 -m pip install torch --index-url https://download.pytorch.org/whl/cu124; \
38-
elif [ "$CUDA_VERSION" = "11.8.0" ]; then \
39-
python3 -m pip install torch --index-url https://download.pytorch.org/whl/cu118; \
40-
python3 -m pip install sgl-kernel -i https://docs.sglang.ai/whl/cu118; \
41-
else \
42-
echo "Unsupported CUDA version: $CUDA_VERSION" && exit 1; \
43-
fi \
44-
&& cd sglang \
45-
&& if [ "$BUILD_TYPE" = "srt" ]; then \
46-
if [ "$CUDA_VERSION" = "12.1.1" ]; then \
47-
python3 -m pip --no-cache-dir install -e "python[srt]" --find-links https://flashinfer.ai/whl/cu121/torch2.5/flashinfer-python; \
48-
elif [ "$CUDA_VERSION" = "12.4.1" ]; then \
49-
python3 -m pip --no-cache-dir install -e "python[srt]" --find-links https://flashinfer.ai/whl/cu124/torch2.5/flashinfer-python; \
50-
elif [ "$CUDA_VERSION" = "12.5.1" ]; then \
51-
python3 -m pip --no-cache-dir install -e "python[srt]" --find-links https://flashinfer.ai/whl/cu124/torch2.5/flashinfer-python; \
52-
elif [ "$CUDA_VERSION" = "11.8.0" ]; then \
53-
python3 -m pip --no-cache-dir install -e "python[srt]" --find-links https://flashinfer.ai/whl/cu118/torch2.5/flashinfer-python; \
54-
python3 -m pip install sgl-kernel -i https://docs.sglang.ai/whl/cu118; \
55-
else \
56-
echo "Unsupported CUDA version: $CUDA_VERSION" && exit 1; \
57-
fi; \
58-
else \
59-
if [ "$CUDA_VERSION" = "12.1.1" ]; then \
60-
python3 -m pip --no-cache-dir install -e "python[all]" --find-links https://flashinfer.ai/whl/cu121/torch2.5/flashinfer-python; \
61-
elif [ "$CUDA_VERSION" = "12.4.1" ]; then \
62-
python3 -m pip --no-cache-dir install -e "python[all]" --find-links https://flashinfer.ai/whl/cu124/torch2.5/flashinfer-python; \
63-
elif [ "$CUDA_VERSION" = "12.5.1" ]; then \
64-
python3 -m pip --no-cache-dir install -e "python[all]" --find-links https://flashinfer.ai/whl/cu124/torch2.5/flashinfer-python; \
65-
elif [ "$CUDA_VERSION" = "11.8.0" ]; then \
66-
python3 -m pip --no-cache-dir install -e "python[all]" --find-links https://flashinfer.ai/whl/cu118/torch2.5/flashinfer-python; \
67-
python3 -m pip install sgl-kernel -i https://docs.sglang.ai/whl/cu118; \
68-
else \
69-
echo "Unsupported CUDA version: $CUDA_VERSION" && exit 1; \
70-
fi; \
71-
fi
72-
73-
ENV DEBIAN_FRONTEND=interactive
1+
FROM lmsysorg/sglang:latest
742

753
COPY serve /usr/bin/serve
764
RUN chmod 777 /usr/bin/serve

0 commit comments

Comments
 (0)