Files
foxhunt/infra/docker/Dockerfile.ci-builder
jgrusewski 20a771578f fix(ci): skip GPU-dependent tests on CPU CI nodes, keep CUDA stub for loading
The backtesting crate links libcuda.so.1 at runtime (via candle CUDA).
GPU-less CI nodes need the stub library so binaries can load, but
model_loader tests that actually use CUDA must be skipped. These will
run on gpu-training nodes separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 12:59:29 +01:00

56 lines
2.1 KiB
Docker

# Pre-baked CI builder image for Foxhunt
# Contains: CUDA 12.4, Rust 1.89, protoc, sccache, git, OpenSSL, lld, make
# 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:12.4.1-cudnn-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
ca-certificates \
pkg-config \
libssl-dev \
lld \
clang \
make \
perl \
build-essential \
libfontconfig1-dev \
unzip \
&& rm -rf /var/lib/apt/lists/*
# 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 S3-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
# clippy pre-installed
RUN rustup component add clippy
# 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 && nvcc --version