|
1 | 1 | FROM nvidia/cuda:12.1.0-base-ubuntu20.04 |
2 | 2 |
|
3 | 3 | ARG PYTHON |
4 | | -ENV PYTHON=$PYTHON |
| 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 |
5 | 10 | ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 |
6 | | -ENV PIP_ROOT_USER_ACTION=ignore |
7 | 11 |
|
8 | | -RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \ |
| 12 | +ENV PATH="${UV_INSTALL_DIR}:${UV_PYTHON_BIN_DIR}:${PATH}" |
| 13 | + |
| 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 && \ |
9 | 16 | apt-get update --fix-missing && \ |
10 | | - apt upgrade -y && \ |
11 | | - export DEBIAN_FRONTEND=noninteractive && \ |
| 17 | + apt-get upgrade -y && \ |
12 | 18 | ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \ |
13 | 19 | apt-get install -y tzdata && \ |
14 | 20 | dpkg-reconfigure --frontend noninteractive tzdata && \ |
15 | 21 | apt-get install -y bzip2 ca-certificates curl build-essential git libglib2.0-0 libsm6 libxext6 libxrender1 mercurial openssh-server subversion wget && \ |
16 | 22 | sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config && mkdir /run/sshd && \ |
17 | 23 | mkdir ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm /etc/ssh/ssh_host_* |
18 | 24 |
|
19 | | -RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \ |
20 | | - bash Miniforge3.sh -b -p "/opt/conda" && \ |
21 | | - rm Miniforge3.sh && \ |
22 | | - ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ |
23 | | - chmod +x /opt/conda/etc/profile.d/conda.sh && \ |
24 | | - echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ |
25 | | - /opt/conda/condabin/conda update conda --all -y && \ |
26 | | - /opt/conda/condabin/conda create --name workflow python=${PYTHON} -y && \ |
27 | | - /opt/conda/condabin/conda config --prepend channels "nvidia/label/cuda-12.1.0" && \ |
28 | | - /opt/conda/condabin/conda config --set always_yes true && \ |
29 | | - /opt/conda/condabin/conda clean --all && \ |
30 | | - echo "conda activate workflow" >> ~/.bashrc |
| 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