Skip to content

Commit 3e746cd

Browse files
committed
fix(guardrails): Add midstream to orchestrator image context
1 parent 57558bf commit 3e746cd

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Dockerfile.orchestrator

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,36 @@ ARG UBI_MINIMAL_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal
22
ARG UBI_BASE_IMAGE_TAG=latest
33
ARG PROTOC_VERSION=26.0
44
ARG CONFIG_FILE=config/config.yaml
5-
5+
ARG ORCH_REPO=/midstream
66
## Rust builder ################################################################
77
# Specific debian version so that compatible glibc version is used
88
FROM rust:1.80.1-bullseye as rust-builder
99
ARG PROTOC_VERSION
10-
10+
ARG ORCH_REPO=/midstream
1111
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
1212

13+
RUN curl -L https://github.com/trustyai-explainability/fms-guardrails-orchestrator/archive/HEAD.tar.gz -o /tmp/orchestrator.tar.gz \
14+
&& mkdir -p /midstream \
15+
&& tar -xzf /tmp/orchestrator.tar.gz -C /midstream --strip-components=1 \
16+
&& cp /midstream/rust-toolchain.toml rust-toolchain.toml \
17+
&& rm /tmp/orchestrator.tar.gz
18+
1319
# Install protoc, no longer included in prost crate
1420
RUN cd /tmp && \
1521
curl -L -O https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
1622
unzip protoc-*.zip -d /usr/local && rm protoc-*.zip
1723

1824
WORKDIR /app
1925

20-
COPY rust-toolchain.toml rust-toolchain.toml
21-
2226
RUN rustup component add rustfmt
2327

2428
## Orchestrator builder #########################################################
2529
FROM rust-builder as fms-guardrails-orchestr8-builder
26-
27-
COPY build.rs *.toml LICENSE /app/
28-
COPY ${CONFIG_FILE} /app/config/config.yaml
29-
COPY protos/ /app/protos/
30-
COPY src/ /app/src/
30+
ARG ORCH_REPO=/midstream
31+
COPY --from=rust-builder /midstream/build.rs /midstream/*.toml /midstream/LICENSE /app/
32+
COPY --from=rust-builder /midstream/${CONFIG_FILE} /app/config/config.yaml
33+
COPY --from=rust-builder /midstream/protos/ /app/protos/
34+
COPY --from=rust-builder /midstream/src/ /app/src/
3135

3236
WORKDIR /app
3337

0 commit comments

Comments
 (0)