File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM nvidia/cuda:12.8.1-devel-ubuntu22.04 AS cu12.8
2+
3+ # environment variables
4+ ENV DEBIAN_FRONTEND=noninteractive \
5+ TZ=Etc/UTC \
6+ PATH=/opt/py3/bin:/root/.local/bin:${PATH} \
7+ TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas
8+
9+ # Install dependencies and create python virtual environment
10+ RUN --mount=type=cache,target=/var/cache/apt \
11+ --mount=type=cache,target=/root/.cache \
12+ sed -i 's|http://archive.ubuntu.com|http://azure.archive.ubuntu.com|g' /etc/apt/sources.list && \
13+ apt-get update -y && \
14+ apt-get install -y --no-install-recommends \
15+ tzdata wget curl openssh-server ssh sudo git-core \
16+ libibverbs1 ibverbs-providers ibverbs-utils librdmacm1 \
17+ libibverbs-dev rdma-core libmlx5-1 libssl-dev pkg-config \
18+ vim rapidjson-dev libgoogle-glog-dev gdb cmake build-essential \
19+ python3-dev ninja-build htop tree jq unzip && \
20+ apt-get clean -y && \
21+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
22+ # install UV
23+ wget -qO- https://astral.sh/uv/install.sh | sh && \
24+ # create Python virtual environment
25+ uv venv -p python3.12 --seed /opt/py3
26+
27+ # Should be in the lmdeploy root directory when building docker image
28+ COPY . /opt/lmdeploy
29+
30+ WORKDIR /opt/lmdeploy
31+
32+ # install lmdeploy and its dependencies
33+ RUN --mount=type=cache,target=/root/.cache/uv \
34+ uv pip install -r requirements_cuda.txt --extra-index-url https://download.pytorch.org/whl/cu128 && \
35+ uv pip install -e .
36+
37+ RUN uv cache clean
You can’t perform that action at this time.
0 commit comments