-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile.sglang
42 lines (37 loc) · 1.5 KB
/
Dockerfile.sglang
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ARG CUDA_VERSION=12.4.1
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu20.04
ARG BUILD_TYPE=all
ENV DEBIAN_FRONTEND=noninteractive
ENV CUDA_IDENTIFIER=cu124
RUN echo 'tzdata tzdata/Areas select America' | debconf-set-selections \
&& echo 'tzdata tzdata/Zones/America select Los_Angeles' | debconf-set-selections \
&& apt update -y \
&& apt install software-properties-common -y \
&& add-apt-repository ppa:deadsnakes/ppa -y && apt update \
&& apt install python3.10 python3.10-dev -y \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2 \
&& update-alternatives --set python3 /usr/bin/python3.10 && apt install python3.10-distutils -y \
&& apt install -y \
curl \
git \
sudo \
# Building triton
zlib1g-dev \
# For libGL.so.1
libgl1 \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py \
&& python3 --version \
&& python3 -m pip --version \
&& rm -rf /var/lib/apt/lists/* \
&& apt clean
WORKDIR /sgl-workspace
COPY . .
RUN python3 -m pip install --upgrade pip setuptools wheel
RUN python3 -m pip install "."
RUN python3 -m pip install ".[no_build_iso]" \
--no-build-isolation
RUN python3 -m pip install -e ".[sglang]" \
--no-build-isolation \
--find-links https://flashinfer.ai/whl/cu124/torch2.4/flashinfer/
RUN python3 -m pip cache purge
ENV DEBIAN_FRONTEND=interactive