forked from acquire-project/chucky
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (59 loc) · 4.95 KB
/
Copy pathDockerfile
File metadata and controls
69 lines (59 loc) · 4.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# syntax=docker/dockerfile:1
# CUDA major.minor.patch tag of the nvidia/cuda base image. SM 100 (Blackwell)
# requires CUDA 12.8+; default is 13.2.1. Override with --build-arg to target
# CUDA 12 (e.g. CUDA_VERSION=12.8.1 CUDA_MAJOR=12).
ARG CUDA_VERSION=13.2.1
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu24.04
# Re-declare ARGs needed in subsequent layers; they are reset by FROM.
ARG CUDA_MAJOR=13
ARG NVCOMP_VERSION=5.3.0.16
# Avoid interactive prompts during package install
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
ninja-build \
libblosc-dev \
libsnappy-dev \
zlib1g-dev \
libzstd-dev \
liblz4-dev \
libomp-dev \
libssl-dev \
python3 \
git \
wget \
curl \
unzip \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Build AWS C libraries from source (not packaged in Ubuntu 24.04).
# Explicit &&-chain so any failure aborts the layer.
RUN git clone --depth 1 --branch v0.12.6 https://github.com/awslabs/aws-c-common.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.9.13 https://github.com/awslabs/aws-c-cal.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.2.10 https://github.com/awslabs/aws-checksums.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v1.7.0 https://github.com/aws/s2n-tls.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.26.3 https://github.com/awslabs/aws-c-io.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.3.2 https://github.com/awslabs/aws-c-compression.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.10.12 https://github.com/awslabs/aws-c-http.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.2.4 https://github.com/awslabs/aws-c-sdkutils.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.10.1 https://github.com/awslabs/aws-c-auth.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b \
&& git clone --depth 1 --branch v0.11.5 https://github.com/awslabs/aws-c-s3.git /tmp/b && cmake -S /tmp/b -B /tmp/b/build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws -DCMAKE_PREFIX_PATH=/opt/aws -DBUILD_TESTING=OFF && cmake --build /tmp/b/build --target install && rm -rf /tmp/b
# AWS CLI for S3 integration tests (standalone, no Python needed)
RUN wget -qO /tmp/awscliv2.zip \
"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" \
&& unzip -q /tmp/awscliv2.zip -d /tmp \
&& /tmp/aws/install \
&& rm -rf /tmp/awscliv2.zip /tmp/aws
RUN wget -qO /tmp/nvcomp.tar.xz \
"https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-x86_64/nvcomp-linux-x86_64-${NVCOMP_VERSION}_cuda${CUDA_MAJOR}-archive.tar.xz" \
&& mkdir -p /opt/nvcomp \
&& tar -xJf /tmp/nvcomp.tar.xz -C /opt/nvcomp --strip-components=1 \
&& rm /tmp/nvcomp.tar.xz
ENV CMAKE_PREFIX_PATH="/opt/nvcomp:/opt/aws"
WORKDIR /src
COPY . .
RUN cmake --preset docker -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
&& cmake --build build