Files
wifi-densepose/examples/google-cloud/Dockerfile.build
ruv d803bfe2b1 Squashed 'vendor/ruvector/' content from commit b64c2172
git-subtree-dir: vendor/ruvector
git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
2026-02-28 14:39:40 -05:00

46 lines
980 B
Docker

# Build in the same environment as runtime
FROM debian:bookworm-slim AS builder
# Install Rust and build dependencies
RUN apt-get update && apt-get install -y \
curl \
build-essential \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /build
# Copy workspace files
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
COPY examples/ examples/
# Build the benchmark binary
RUN cargo build --release -p ruvector-cloudrun-gpu
# Runtime stage - same base as builder
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
libssl3 \
ca-certificates \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy binary from builder
COPY --from=builder /build/target/release/gpu-benchmark ./
ENV PORT=8080
ENV RUST_LOG=info
EXPOSE 8080
CMD ["./gpu-benchmark", "serve", "--port", "8080"]