Source: docs.nvidia.com/nsight-systems/InstallationGuide Repo: developer.download.nvidia.com/devtools/repos/ubuntu2404/amd64/ Key: 7fa2af80.pub from CUDA repo Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
79 lines
3.4 KiB
Docker
79 lines
3.4 KiB
Docker
# Pre-baked CI builder image for Foxhunt
|
|
# Contains: CUDA 12.9, Rust 1.89, protoc, sccache, git, OpenSSL, lld, make
|
|
# No cuDNN — zero conv ops in codebase, all cudnn feature flags removed
|
|
# Build: docker build -f infra/docker/Dockerfile.ci-builder -t foxhunt-ci-builder .
|
|
# Push: docker tag foxhunt-ci-builder git.fxhnt.ai:5050/root/foxhunt/ci-builder:latest
|
|
# docker push git.fxhnt.ai:5050/root/foxhunt/ci-builder:latest
|
|
|
|
FROM nvidia/cuda:13.0.0-devel-ubuntu24.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
git \
|
|
curl \
|
|
ca-certificates \
|
|
openssh-client \
|
|
pkg-config \
|
|
libssl-dev \
|
|
lld \
|
|
clang \
|
|
make \
|
|
perl \
|
|
build-essential \
|
|
libfontconfig1-dev \
|
|
unzip \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# mold linker — 2-5x faster than lld for final link step on large Rust binaries
|
|
RUN curl -fsSL https://github.com/rui314/mold/releases/download/v2.35.1/mold-2.35.1-x86_64-linux.tar.gz \
|
|
| tar xz -C /usr/local --strip-components=1 \
|
|
&& chmod +x /usr/local/bin/mold
|
|
|
|
# protoc 28.3 (proto3 optional support, matches local dev)
|
|
RUN curl -fsSL https://github.com/protocolbuffers/protobuf/releases/download/v28.3/protoc-28.3-linux-x86_64.zip -o /tmp/protoc.zip \
|
|
&& unzip -o /tmp/protoc.zip -d /usr/local bin/protoc 'include/*' \
|
|
&& rm /tmp/protoc.zip \
|
|
&& chmod +x /usr/local/bin/protoc
|
|
|
|
# Install Rust 1.89 stable
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.89.0
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
# sccache for local PVC-backed build caching
|
|
RUN curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.10.0/sccache-v0.10.0-x86_64-unknown-linux-musl.tar.gz \
|
|
| tar xz -C /usr/local/bin --strip-components=1 sccache-v0.10.0-x86_64-unknown-linux-musl/sccache \
|
|
&& chmod +x /usr/local/bin/sccache
|
|
|
|
# rclone for S3 binary uploads (compile → S3)
|
|
RUN curl -fsSL https://downloads.rclone.org/v1.69.1/rclone-v1.69.1-linux-amd64.zip -o /tmp/rclone.zip \
|
|
&& unzip -j /tmp/rclone.zip '*/rclone' -d /usr/local/bin/ \
|
|
&& rm /tmp/rclone.zip \
|
|
&& chmod +x /usr/local/bin/rclone
|
|
|
|
# clippy pre-installed
|
|
RUN rustup component add clippy
|
|
|
|
# Nsight Systems CLI — GPU profiling for CUDA graph node-level traces
|
|
# Source: https://docs.nvidia.com/nsight-systems/InstallationGuide/index.html
|
|
RUN echo "deb http://developer.download.nvidia.com/devtools/repos/ubuntu2404/amd64/ /" \
|
|
> /etc/apt/sources.list.d/nvidia-devtools.list \
|
|
&& apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends nsight-systems-cli \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& nsys --version
|
|
|
|
# CUDA env
|
|
ENV CUDA_HOME=/usr/local/cuda
|
|
ENV PATH="${CUDA_HOME}/bin:${PATH}"
|
|
ENV LD_LIBRARY_PATH="${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}"
|
|
|
|
# libcuda.so.1 stub — lets CUDA-linked binaries load on GPU-less CI nodes
|
|
# (stubs dir has libcuda.so but the dynamic linker needs .so.1)
|
|
RUN ln -sf /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1
|
|
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH}"
|
|
|
|
# Verify
|
|
RUN rustc --version && cargo --version && git --version && protoc --version && sccache --version && make --version && mold --version && nvcc --version && rclone --version
|