@@ -7,28 +7,28 @@ ARG DEBIAN_FRONTEND=noninteractive
77ENV LANGUAGE=en_US.UTF-8
88ENV LANG=en_US.UTF-8
99
10- ARG INSTALL_TORCH
1110ARG LLVM_VERSION
1211ARG IMAGE_VERSION
13- ARG TORCH_VERSION
12+ ARG IMAGE_NAME
1413
1514LABEL maintainer="JamesNULLiu jamesnulliu@gmail.com"
1615LABEL version=${IMAGE_VERSION}
1716
17+ ENV IMAGE_NAME=${IMAGE_NAME}
1818ENV CUDA_HOME=/usr/local/cuda
1919ENV VCPKG_ROOT=/opt/vcpkg
2020ENV VCPKG_HOME=/opt/vcpkg
21- ENV CONDA_HOME =/opt/miniconda3
21+ ENV UV_HOME =/opt/uv
2222ENV ENV_SETUP_FILE=/etc/local/env_setup.sh
2323
2424SHELL ["/bin/bash", "-c"]
2525
2626# Some basic tools
2727RUN apt-get update && apt-get upgrade -y && \
2828 apt-get install -y \
29- apt-utils lsb-release software-properties-common gnupg git \
29+ apt-utils lsb-release software-properties-common gnupg git acl sed \
3030 vim-gtk3 wget p7zip-full ninja-build curl jq pkg-config ssh \
31- build-essential gdb htop tmux ttf-mscorefonts-installer kmod \
31+ build-essential gdb htop tmux ttf-mscorefonts-installer kmod \
3232 libssl-dev && \
3333 fc-cache -f -v
3434
@@ -66,36 +66,17 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
6666# Config files
6767COPY data/vimrc /etc/vim/vimrc
6868COPY data/env_setup.sh ${ENV_SETUP_FILE}
69- # [TODO] The config files should not only be copied only to /root, but also to
70- # /etc/skel, so that the new user can also use them. But in singularity,
71- # /etc/skel has no effect, so I will decide what to do later.
7269COPY data/.inputrc data/.bashrc data/.tmux.conf /root/
7370COPY data/.inputrc data/.bashrc data/.tmux.conf /etc/skel/
71+ COPY data/create-shared-dir /usr/local/bin/
7472
75- # Install Miniconda3 and conda env
76- # [TODO] Conda now uses python=3.13 in default. However, some packages (i.e.,
77- # vllm) only support python<=3.12. That's why I install python=3.12
78- # mannually here. Maybe some days later I will remove this command.
79- RUN wget -O /tmp/miniconda3.sh \
80- https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
81- mkdir -p ${CONDA_HOME} && \
82- bash /tmp/miniconda3.sh -b -u -p ${CONDA_HOME} && \
83- ${CONDA_HOME}/bin/conda tos accept && \
84- \. ${CONDA_HOME}/bin/activate && \
85- conda upgrade libstdcxx-ng -c conda-forge -y && \
86- conda install -y python=3.12 && \
87- pip3 install nvitop --no-cache-dir && \
88- if [[ "${INSTALL_TORCH}" == "true" ]]; then \
89- TORCH_CU_VER=$(echo $CUDA_VERSION | cut -d'.' -f1,2 | tr -d '.') && \
90- pip3 install torch==${TORCH_VERSION} torchvision torchaudio \
91- --index-url "https://download.pytorch.org/whl/cu${TORCH_CU_VER}" \
92- --no-cache-dir \
93- ; fi
73+ # Install uv
74+ RUN curl -LsSf https://astral.sh/uv/install.sh | \
75+ env UV_INSTALL_DIR="${UV_HOME}" UV_NO_MODIFY_PATH=1 sh
9476
9577# Some final steps
9678RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y && \
9779 apt-get clean && rm -rf /var/lib/apt/lists/* && \
98- conda clean --all -y && pip cache purge && \
9980 git config --system --unset-all user.name || true && \
10081 git config --system --unset-all user.email || true && \
10182 git config --global --unset-all user.name || true && \
0 commit comments