Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions docker/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
FROM nvidia/cuda:12.1.0-base-ubuntu20.04

ARG PYTHON
ENV PYTHON=$PYTHON
ARG _UV_HOME="/opt/uv"
ENV UV_PYTHON="${PYTHON}"
ENV UV_INSTALL_DIR="${_UV_HOME}/bin"
ENV UV_PYTHON_INSTALL_DIR="${_UV_HOME}/python"
ENV UV_PYTHON_BIN_DIR="${UV_PYTHON_INSTALL_DIR}/bin"
ENV UV_MANAGED_PYTHON=1
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PIP_ROOT_USER_ACTION=ignore

RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \
ENV PATH="${UV_INSTALL_DIR}:${UV_PYTHON_BIN_DIR}:${PATH}"

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

RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \
bash Miniforge3.sh -b -p "/opt/conda" && \
rm Miniforge3.sh && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
chmod +x /opt/conda/etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
/opt/conda/condabin/conda update conda --all -y && \
/opt/conda/condabin/conda create --name workflow python=${PYTHON} -y && \
/opt/conda/condabin/conda config --prepend channels "nvidia/label/cuda-12.1.0" && \
/opt/conda/condabin/conda config --set always_yes true && \
/opt/conda/condabin/conda clean --all && \
echo "conda activate workflow" >> ~/.bashrc
RUN curl -LsSf https://astral.sh/uv/install.sh | INSTALLER_NO_MODIFY_PATH=1 sh && \
uv python install --preview --default
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does --preview do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ uv python install 3.10 --default
The `--default` flag is only available in preview mode; add the `--preview` flag to use `--default`

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.astral.sh/uv/reference/settings/#preview

Whether to enable experimental, preview features.

3 changes: 1 addition & 2 deletions docker/base/devel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ ARG VERSION

FROM dstackai/base:py$PYTHON-$VERSION-cuda-12.1

RUN /opt/conda/condabin/conda install --name workflow cuda -y && \
/opt/conda/condabin/conda clean --all
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y cuda-12-1
Loading