Files
ere/docker/openvm/Dockerfile.base
2025-11-18 09:37:01 +08:00

37 lines
1021 B
Docker

ARG BASE_IMAGE=ere-base:latest
ARG BASE_CUDA_IMAGE=ere-base:latest-cuda
# Whether to enable CUDA feature or not.
ARG CUDA
FROM $BASE_IMAGE AS base
FROM $BASE_CUDA_IMAGE AS base_cuda
FROM base${CUDA:+_cuda}
# The ere-base image provides Rust, Cargo, and common tools.
# We operate as root for SDK installation.
# Set default toolchain to nightly
RUN rustup default nightly
ARG CUDA
# Default to build for RTX 50 series
ARG CUDA_ARCH=sm_120
# Env variable read by OpenVM crate `cuda-builder`, need to persist it for building `ere-openvm`.
ENV CUDA_ARCH=${CUDA_ARCH#sm_}
# Copy the OpenVM SDK installer script from the workspace context
COPY --chmod=755 scripts/sdk_installers/install_openvm_sdk.sh /tmp/install_openvm_sdk.sh
# Run the OpenVM SDK installation script.
# This script installs a specific toolchain
# and installs cargo-openvm.
RUN /tmp/install_openvm_sdk.sh && rm /tmp/install_openvm_sdk.sh
# Verify cargo-openvm is accessible with the correct toolchain
RUN cargo openvm --version
CMD ["/bin/bash"]