Skip to content

Commit 3ab5859

Browse files
committed
Add an Ubuntu 24/CUDA 13.0 Docker file.
This is just a copy of `container/ubuntu24-cuda12/Dockerfile` with all occurrences of `cuda:12.8.1` replaced with `cuda:13.0.2`.
1 parent 2891f7d commit 3ab5859

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
FROM nvcr.io/nvidia/cuda:13.0.2-cudnn-devel-ubuntu24.04 AS llvm-builder
2+
3+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \
4+
build-essential \
5+
clang \
6+
curl \
7+
libffi-dev \
8+
libedit-dev \
9+
libncurses5-dev \
10+
libssl-dev \
11+
libtinfo-dev \
12+
libxml2-dev \
13+
cmake \
14+
ninja-build \
15+
pkg-config \
16+
python3 \
17+
xz-utils \
18+
zlib1g-dev && \
19+
rm -rf /var/lib/apt/lists/*
20+
21+
WORKDIR /data/llvm7
22+
23+
# Download and build LLVM 7.1.0 for all architectures.
24+
RUN curl -sSf -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-7.1.0/llvm-7.1.0.src.tar.xz && \
25+
tar -xf llvm-7.1.0.src.tar.xz && \
26+
cd llvm-7.1.0.src && \
27+
mkdir build && cd build && \
28+
ARCH=$(dpkg --print-architecture) && \
29+
if [ "$ARCH" = "amd64" ]; then \
30+
TARGETS="X86;NVPTX"; \
31+
else \
32+
TARGETS="AArch64;NVPTX"; \
33+
fi && \
34+
cmake -G Ninja \
35+
-DCMAKE_BUILD_TYPE=Release \
36+
-DLLVM_TARGETS_TO_BUILD="$TARGETS" \
37+
-DLLVM_BUILD_LLVM_DYLIB=ON \
38+
-DLLVM_LINK_LLVM_DYLIB=ON \
39+
-DLLVM_ENABLE_ASSERTIONS=OFF \
40+
-DLLVM_ENABLE_BINDINGS=OFF \
41+
-DLLVM_INCLUDE_EXAMPLES=OFF \
42+
-DLLVM_INCLUDE_TESTS=OFF \
43+
-DLLVM_INCLUDE_BENCHMARKS=OFF \
44+
-DLLVM_ENABLE_ZLIB=ON \
45+
-DLLVM_ENABLE_TERMINFO=ON \
46+
-DCMAKE_INSTALL_PREFIX=/opt/llvm-7 \
47+
.. && \
48+
ninja -j$(nproc) && \
49+
ninja install && \
50+
cd ../.. && \
51+
rm -rf llvm-7.1.0.src*
52+
53+
FROM nvcr.io/nvidia/cuda:13.0.2-cudnn-devel-ubuntu24.04
54+
55+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -qq -y install \
56+
build-essential \
57+
clang \
58+
curl \
59+
libssl-dev \
60+
libtinfo-dev \
61+
pkg-config \
62+
xz-utils \
63+
zlib1g-dev \
64+
cmake \
65+
libfontconfig-dev \
66+
libx11-xcb-dev \
67+
libxcursor-dev \
68+
libxi-dev \
69+
libxinerama-dev \
70+
libxrandr-dev && \
71+
rm -rf /var/lib/apt/lists/*
72+
73+
COPY --from=llvm-builder /opt/llvm-7 /opt/llvm-7
74+
RUN ln -s /opt/llvm-7/bin/llvm-config /usr/bin/llvm-config && \
75+
ln -s /opt/llvm-7/bin/llvm-config /usr/bin/llvm-config-7
76+
77+
# Get Rust (install rustup; toolchain installed from rust-toolchain.toml below)
78+
RUN curl -sSf -L https://sh.rustup.rs | bash -s -- -y --profile minimal --default-toolchain none
79+
ENV PATH="/root/.cargo/bin:${PATH}"
80+
81+
# Setup the workspace
82+
WORKDIR /data/rust-cuda
83+
RUN --mount=type=bind,source=rust-toolchain.toml,target=/data/rust-cuda/rust-toolchain.toml \
84+
rustup show
85+
86+
# Add nvvm to LD_LIBRARY_PATH.
87+
ENV LD_LIBRARY_PATH="/usr/local/cuda/nvvm/lib64:${LD_LIBRARY_PATH}"
88+
ENV LLVM_LINK_STATIC=1
89+
ENV RUST_LOG=info

0 commit comments

Comments
 (0)