diff --git a/rust/worker/Dockerfile b/rust/worker/Dockerfile index ae9ce8f32df..6cf34960217 100644 --- a/rust/worker/Dockerfile +++ b/rust/worker/Dockerfile @@ -1,5 +1,6 @@ FROM rust:1.74.1 as builder ARG CHROMA_KUBERNETES_INTEGRATION=0 +ARG RELEASE_MODE=0 ENV CHROMA_KUBERNETES_INTEGRATION $CHROMA_KUBERNETES_INTEGRATION WORKDIR / @@ -15,7 +16,8 @@ RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v25.1 COPY . . -RUN --mount=type=cache,target=/root/.cache/cargo CARGO_TARGET_DIR=/root/.cache/cargo cargo build +ENV CARGO_TARGET_DIR=/root/.cache/cargo +RUN --mount=type=cache,target=/root/.cache/cargo if [ "$RELEASE_MODE" = "1" ]; then cargo build --release; else cargo build; fi WORKDIR /chroma/rust/worker