-
Notifications
You must be signed in to change notification settings - Fork 209
Replace conda with uv in dstackai/base images
#2649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
--previewdo?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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