FROM nvidia/cuda:12.6.3-devel-ubuntu24.04 AS builder RUN apt-get update && apt-get install -y \ curl pkg-config libssl-dev g++ libvulkan-dev \ && rm -rf /var/lib/apt/lists/* # Rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y ENV PATH="/root/.cargo/bin:${PATH}" WORKDIR /app COPY Cargo.toml Cargo.lock ./ COPY hub/Cargo.toml hub/Cargo.toml COPY node/Cargo.toml node/Cargo.toml COPY native-node/Cargo.toml native-node/Cargo.toml COPY cli/Cargo.toml cli/Cargo.toml # Tyhjät src-tiedostot riippuvuuksien esikääntämistä varten RUN mkdir -p hub/src node/src native-node/src cli/src \ && echo "fn main(){}" > hub/src/main.rs \ && echo "" > node/src/lib.rs \ && echo "fn main(){}" > native-node/src/main.rs \ && echo "fn main(){}" > cli/src/main.rs \ && cargo build --release -p native-node 2>/dev/null || true COPY native-node/src native-node/src RUN cargo build --release -p native-node FROM nvidia/cuda:12.6.3-runtime-ubuntu24.04 RUN apt-get update && apt-get install -y ca-certificates libvulkan1 && rm -rf /var/lib/apt/lists/* COPY --from=builder /app/target/release/native-node /usr/local/bin/native-node ENV HUB_URL=ws://agentic-poc:3000/ws ENV ALLOCATED_GB=4 CMD ["native-node"]