Dockerfile 1.16 KB
Newer Older
Ying Sheng's avatar
Ying Sheng committed
1
ARG CUDA_VERSION=12.4.1
Ying Sheng's avatar
Ying Sheng committed
2

Ying Sheng's avatar
Ying Sheng committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu22.04

ARG CUDA_VERSION=12.4.1
ARG PYTHON_VERSION=3

ENV DEBIAN_FRONTEND=noninteractive

RUN echo 'tzdata tzdata/Areas select America' | debconf-set-selections \
    && echo 'tzdata tzdata/Zones/America select Los_Angeles' | debconf-set-selections \
    && apt-get update -y \
    && apt-get install -y ccache software-properties-common \
    && add-apt-repository ppa:deadsnakes/ppa \
    && apt-get update -y \
    && apt-get install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv python3-pip \
    && if [ "${PYTHON_VERSION}" != "3" ]; then update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1; fi \
    && python3 --version \
Liangsheng Yin's avatar
Liangsheng Yin committed
19
20
21
    && python3 -m pip --version \
    && rm -rf /var/lib/apt/lists/* \
    && apt-get clean
Ying Sheng's avatar
Ying Sheng committed
22
23
24
25
26
27

RUN apt-get update -y \
    && apt-get install -y python3-pip git curl sudo

WORKDIR /sgl-workspace

Liangsheng Yin's avatar
Liangsheng Yin committed
28
29
30
RUN pip3 --no-cache-dir install --upgrade pip \
    && pip3 --no-cache-dir install "sglang[all]" \
    && pip3 --no-cache-dir install flashinfer -i https://flashinfer.ai/whl/cu121/torch2.3/
Ying Sheng's avatar
Ying Sheng committed
31
32

ENV DEBIAN_FRONTEND=interactive