@@ -10,6 +10,7 @@ ENV LANG=en_US.UTF-8
1010
1111ARG IMAGE_VERSION
1212ARG TORCH_VERSION
13+ ARG TORCH_CUDA_VERSION
1314
1415LABEL maintainer="JamesNULLiu jamesnulliu@gmail.com"
1516LABEL version=${IMAGE_VERSION}
@@ -21,25 +22,34 @@ RUN apt-get update && apt-get upgrade -y && \
2122 apt-get install -y \
2223 apt-utils lsb-release software-properties-common gnupg git \
2324 vim-gtk3 wget p7zip-full ninja-build curl jq pkg-config ssh \
24- build-essential gdb htop tmux ttf-mscorefonts-installer kmod \
25+ build-essential gdb htop tmux ttf-mscorefonts-installer kmod \
2526 libssl-dev && \
2627 fc-cache -f -v
2728
28- # Vcpkg, Cmake, LLVM
29+ # Vcpkg
2930RUN cd /usr/local && git clone https://github.com/microsoft/vcpkg.git && \
30- cd vcpkg && ./bootstrap-vcpkg.sh && \
31- wget -O /tmp/kitware-archive.sh \
32- https://apt.kitware.com/kitware-archive.sh && \
31+ cd vcpkg && ./bootstrap-vcpkg.sh
32+
33+ # Cmake
34+ RUN wget -O /tmp/kitware-archive.sh \
35+ https://apt.kitware.com/kitware-archive.sh && \
3336 bash /tmp/kitware-archive.sh && \
34- apt-get update && apt-get install -y cmake && \
35- wget -O /tmp/llvm.sh https://apt.llvm.org/llvm.sh && \
36- chmod +x /tmp/llvm.sh && /tmp/llvm.sh ${LLVM_VERSION} && \
37- apt-get install -y libomp-${LLVM_VERSION}-dev && \
38- ln -s /usr/bin/clang-${LLVM_VERSION} /usr/bin/clang && \
39- ln -s /usr/bin/clang++-${LLVM_VERSION} /usr/bin/clang++ && \
40- ln -s /usr/bin/clangd-${LLVM_VERSION} /usr/bin/clangd && \
41- ln -s /usr/bin/clang-tidy-${LLVM_VERSION} /usr/bin/clang-tidy && \
42- ln -s /usr/bin/clang-format-${LLVM_VERSION} /usr/bin/clang-format
37+ apt-get update && apt-get install -y cmake
38+
39+ # LLVM
40+ RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | \
41+ apt-key add - && \
42+ echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble main" | \
43+ tee /etc/apt/sources.list.d/llvm.list && \
44+ echo "deb-src http://apt.llvm.org/noble/ llvm-toolchain-noble main" | \
45+ tee -a /etc/apt/sources.list.d/llvm.list && \
46+ apt-get update && apt-get install -y clang-format clang-tidy clang-tools \
47+ clang clangd libc++-dev libc++1 libc++abi-dev libc++abi1 libclang-dev \
48+ libclang1 liblldb-dev libllvm-ocaml-dev libomp-dev libomp5 lld lldb \
49+ llvm-dev llvm-runtime llvm python3-clang
50+
51+ # Rust
52+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -y
4353
4454# Config files
4555COPY data/.vimrc data/.inputrc data/.bashrc data/.tmux.conf /root/
@@ -51,8 +61,9 @@ RUN wget -O /tmp/miniconda3.sh \
5161 bash /tmp/miniconda3.sh -b -u -p /root/miniconda3 && \
5262 \. /root/miniconda3/bin/activate && \
5363 conda upgrade libstdcxx-ng -c conda-forge -y && \
64+ pip3 install nvitop && \
5465 pip3 install torch==${TORCH_VERSION} torchvision torchaudio \
55- --index-url https://download.pytorch.org/whl/cu126 \
66+ --index-url " https://download.pytorch.org/whl/${TORCH_CUDA_VERSION}" \
5667 --no-cache-dir
5768
5869# Some final steps
0 commit comments