Skip to content

Commit 87fedff

Browse files
committed
Update build containers for cuda13
1 parent 6a972db commit 87fedff

File tree

4 files changed

+111
-4
lines changed

4 files changed

+111
-4
lines changed

.github/workflows/docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ jobs:
3333
include:
3434
- suffix: x86_64
3535
dockerfile: Dockerfile.GPU-manylinux2014
36+
- suffix: x86_64-manylinux_2_28-cuda13_1
37+
dockerfile: Dockerfile.GPU-manylinux_2_28
3638
- suffix: sbsa
3739
dockerfile: Dockerfile.GPU-buster-cross-sbsa
40+
- suffix: sbsa-cuda13_1
41+
dockerfile: Dockerfile.GPU-buster-cross-sbsa_13_1
3842
steps:
3943
- name: Checkout repository
4044
uses: actions/checkout@v3
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
FROM debian:buster
2+
ARG VER="13-1"
3+
4+
ENV OMPVERSION=20.1.7
5+
ENV PATH=/root/.cargo/bin:$PATH
6+
ENV LIBOMP_AARCH64="/opt/libomp"
7+
8+
WORKDIR /opt
9+
RUN dpkg --add-architecture arm64 && \
10+
sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list && \
11+
sed -i s/security.debian.org/archive.debian.org/g /etc/apt/sources.list && \
12+
apt-get update && \
13+
apt-get -y install -o APT::Immediate-Configure=false \
14+
git curl wget vim ninja-build crossbuild-essential-arm64 zlib1g-dev:arm64 libbz2-dev:arm64 software-properties-common && \
15+
wget https://github.com/Kitware/CMake/releases/download/v3.31.0/cmake-3.31.0-linux-x86_64.sh && \
16+
chmod +x cmake-3.31.0-linux-x86_64.sh && \
17+
./cmake-3.31.0-linux-x86_64.sh --skip-license --prefix=/usr/local && \
18+
rm -f cmake-3.31.0-linux-x86_64.sh && \
19+
wget -O cuda-x64.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb && \
20+
wget -O cuda-sbsa.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/cross-linux-sbsa/cuda-keyring_1.1-1_all.deb && \
21+
dpkg -i cuda-x64.deb && dpkg -i cuda-sbsa.deb && \
22+
rm -f cuda-x64.deb cuda-sbsa.deb && \
23+
apt-get update && \
24+
apt-get install -y cuda-nvcc-${VER} cuda-nvcc-cross-sbsa-${VER} cuda-cudart-cross-sbsa-${VER} libcublas-cross-sbsa-${VER} && \
25+
rm -rf /var/lib/apt/lists/* && \
26+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal -y && \
27+
rustup toolchain install stable-x86_64-unknown-linux-gnu && \
28+
rustup default stable-x86_64-unknown-linux-gnu && \
29+
rustup target add aarch64-unknown-linux-gnu && \
30+
curl https://apt.llvm.org/llvm.sh -sSf | bash -s -- 20 && \
31+
echo "set(CMAKE_SYSTEM_NAME Linux)" > /opt/toolchain.cmake && \
32+
echo "set(CMAKE_SYSTEM_PROCESSOR aarch64)" >> /opt/toolchain.cmake && \
33+
echo "set(CMAKE_C_COMPILER /opt/clang-aarch64)" >> /opt/toolchain.cmake && \
34+
echo "set(CMAKE_CXX_COMPILER /opt/clang++-aarch64)" >> /opt/toolchain.cmake && \
35+
echo 'set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_CXX_COMPILER})' >> /opt/toolchain.cmake && \
36+
echo "set(CMAKE_CUDA_COMPILER /usr/local/cuda/bin/nvcc)" >> /opt/toolchain.cmake && \
37+
echo 'set(CMAKE_CUDA_FLAGS "-t 0 --split-compile=0 -allow-unsupported-compiler")' >> /opt/toolchain.cmake && \
38+
echo 'set(CMAKE_CUDA_LINK_FLAGS "-t 0 --split-compile=0 -allow-unsupported-compiler")' >> /opt/toolchain.cmake && \
39+
echo '#!/bin/sh\n/usr/bin/clang-20 --target=aarch64-linux-gnu "${@}"\n' > /opt/clang-aarch64 && \
40+
echo '#!/bin/sh\n/usr/bin/clang++-20 --target=aarch64-linux-gnu "${@}"\n' > /opt/clang++-aarch64 && \
41+
chmod +x /opt/clang-aarch64 /opt/clang++-aarch64 && \
42+
cat /opt/clang-aarch64 /opt/clang++-aarch64 && \
43+
mkdir -p /opt/build_libomp && cd /opt/build_libomp && \
44+
wget -qO- https://github.com/llvm/llvm-project/releases/download/llvmorg-${OMPVERSION}/cmake-${OMPVERSION}.src.tar.xz | tar xJvf - && \
45+
wget -qO- https://github.com/llvm/llvm-project/releases/download/llvmorg-${OMPVERSION}/openmp-${OMPVERSION}.src.tar.xz | tar xJvf - && \
46+
mv cmake-${OMPVERSION}.src cmake && \
47+
cd openmp-${OMPVERSION}.src && \
48+
mkdir -p build-arm64 && cd build-arm64 && \
49+
cmake \
50+
-GNinja \
51+
-DLIBOMP_ENABLE_SHARED=OFF \
52+
-DLIBOMP_INSTALL_ALIASES=OFF \
53+
-DLIBOMP_ARCH=aarch64 \
54+
-DCMAKE_TOOLCHAIN_FILE=/opt/toolchain.cmake \
55+
.. && \
56+
cmake --build . -j$(nproc --all) -v && \
57+
mkdir -p ${LIBOMP_AARCH64} && \
58+
cp -r /opt/build_libomp/openmp-${OMPVERSION}.src/build-arm64/runtime/src/* ${LIBOMP_AARCH64} && \
59+
rm -rf /opt/build_libomp

Dockerfile.GPU-manylinux2014

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ RUN yum install -y yum-utils; \
3333
make install PREFIX=/deps; \
3434
rm -rf -- /deps/bzip2-1.0.8.tar.gz /deps/bzip2-1.0.8; \
3535
cd /deps; \
36-
wget https://www.zlib.net/zlib-1.3.1.tar.gz; \
37-
tar xzvf zlib-1.3.1.tar.gz; \
38-
cd zlib-1.3.1; \
36+
wget https://www.zlib.net/zlib-1.3.2.tar.gz; \
37+
tar xzvf zlib-1.3.2.tar.gz; \
38+
cd zlib-1.3.2; \
3939
./configure --prefix=/deps --static; \
4040
make install; \
41-
rm -rf -- /deps/zlib-1.3.1.tar.gz /deps/zlib-1.3.1; \
41+
rm -rf -- /deps/zlib-1.3.2.tar.gz /deps/zlib-1.3.2; \
4242
cd /opt; \
4343
curl https://sh.rustup.rs -sSf | \
4444
sh -s -- --default-toolchain stable -y;

Dockerfile.GPU-manylinux_2_28

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM quay.io/pypa/manylinux_2_28_x86_64
2+
ARG VER="13-1"
3+
ARG ARCH="x86_64"
4+
5+
ENV PATH="/root/.cargo/bin:/usr/local/cuda/bin:${PATH}"
6+
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
7+
ENV CUDA_HOME=/usr/local/cuda
8+
ENV CUDA_ROOT=/usr/local/cuda
9+
ENV CUDA_PATH=/usr/local/cuda
10+
ENV CUDADIR=/usr/local/cuda
11+
ENV CC=/opt/rh/gcc-toolset-11/root/bin/gcc
12+
ENV CXX=/opt/rh/gcc-toolset-11/root/bin/g++
13+
ENV CUDAHOSTCXX=/opt/rh/gcc-toolset-11/root/bin/g++
14+
ENV CUDACXX=/usr/local/cuda/bin/nvcc
15+
ENV LIBGCC=/opt/rh/gcc-toolset-11/root/usr/lib/gcc/x86_64-redhat-linux/11
16+
ENV LIBRARY_PATH="/opt/rh/gcc-toolset-11/root/usr/lib/gcc/x86_64-redhat-linux/11:/opt/rh/gcc-toolset-11/root/usr/lib64"
17+
18+
WORKDIR /opt
19+
RUN dnf install -y dnf-plugins-core && \
20+
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo && \
21+
dnf -y install cuda-nvcc-${VER}.${ARCH} cuda-cudart-devel-${VER}.${ARCH} libcublas-devel-${VER}.${ARCH} && \
22+
echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/999_nvidia_cuda.conf && \
23+
dnf install -y git curl wget vim glibc-static zlib-devel bzip2-devel ninja-build gcc gcc-c++ libatomic \
24+
gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-libatomic-devel gcc-toolset-11-libstdc++-devel && \
25+
wget https://github.com/Kitware/CMake/releases/download/v3.31.0/cmake-3.31.0-linux-x86_64.sh && \
26+
chmod +x cmake-3.31.0-linux-x86_64.sh && \
27+
./cmake-3.31.0-linux-x86_64.sh --skip-license --prefix=/usr/local && \
28+
mkdir /deps && \
29+
cd /deps && \
30+
wget https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz && \
31+
tar xzvf bzip2-1.0.8.tar.gz && \
32+
cd bzip2-1.0.8 && \
33+
make install PREFIX=/deps && \
34+
rm -rf -- /deps/bzip2-1.0.8.tar.gz /deps/bzip2-1.0.8 && \
35+
cd /deps && \
36+
wget https://www.zlib.net/zlib-1.3.2.tar.gz && \
37+
tar xzvf zlib-1.3.2.tar.gz && \
38+
cd zlib-1.3.2 && \
39+
./configure --prefix=/deps --static && \
40+
make install && \
41+
rm -rf -- /deps/zlib-1.3.2.tar.gz /deps/zlib-1.3.2 && \
42+
cd /opt && \
43+
curl https://sh.rustup.rs -sSf | \
44+
sh -s -- --default-toolchain stable -y

0 commit comments

Comments
 (0)