Skip to content

Commit db4b749

Browse files
[UX]: Replace conda with uv in dstack's default Docker image #2625
* Updated CUDA to 12.1.1 * Use NVIDIA's devel image
1 parent 1383b9c commit db4b749

2 files changed

Lines changed: 24 additions & 4 deletions

File tree

docker/base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM nvidia/cuda:12.1.0-base-ubuntu20.04
1+
FROM nvidia/cuda:12.1.1-base-ubuntu20.04
22

33
ARG PYTHON
44
ARG _UV_HOME="/opt/uv"

docker/base/devel.Dockerfile

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
1+
FROM nvidia/cuda:12.1.1-devel-ubuntu20.04
2+
13
ARG PYTHON
2-
ARG VERSION
4+
ARG _UV_HOME="/opt/uv"
5+
ENV UV_PYTHON="${PYTHON}"
6+
ENV UV_INSTALL_DIR="${_UV_HOME}/bin"
7+
ENV UV_PYTHON_INSTALL_DIR="${_UV_HOME}/python"
8+
ENV UV_PYTHON_BIN_DIR="${UV_PYTHON_INSTALL_DIR}/bin"
9+
ENV UV_MANAGED_PYTHON=1
10+
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
11+
12+
ENV PATH="${UV_INSTALL_DIR}:${UV_PYTHON_BIN_DIR}:${PATH}"
313

4-
FROM dstackai/base:py$PYTHON-$VERSION-cuda-12.1
14+
RUN export DEBIAN_FRONTEND=noninteractive && \
15+
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \
16+
apt-get update --fix-missing && \
17+
apt-get upgrade -y && \
18+
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
19+
apt-get install -y tzdata && \
20+
dpkg-reconfigure --frontend noninteractive tzdata && \
21+
apt-get install -y bzip2 ca-certificates curl build-essential git libglib2.0-0 libsm6 libxext6 libxrender1 mercurial openssh-server subversion wget && \
22+
sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config && mkdir /run/sshd && \
23+
mkdir ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm /etc/ssh/ssh_host_*
524

6-
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cuda-12-1
25+
RUN curl -LsSf https://astral.sh/uv/install.sh | INSTALLER_NO_MODIFY_PATH=1 sh && \
26+
uv python install --preview --default

0 commit comments

Comments
 (0)