@@ -2,32 +2,36 @@ ARG UBI_MINIMAL_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal
2
2
ARG UBI_BASE_IMAGE_TAG=latest
3
3
ARG PROTOC_VERSION=26.0
4
4
ARG CONFIG_FILE=config/config.yaml
5
-
5
+ ARG ORCH_REPO=/midstream
6
6
## Rust builder ################################################################
7
7
# Specific debian version so that compatible glibc version is used
8
8
FROM rust:1.80.1-bullseye as rust-builder
9
9
ARG PROTOC_VERSION
10
-
10
+ ARG ORCH_REPO=/midstream
11
11
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
12
12
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
+
13
19
# Install protoc, no longer included in prost crate
14
20
RUN cd /tmp && \
15
21
curl -L -O https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
16
22
unzip protoc-*.zip -d /usr/local && rm protoc-*.zip
17
23
18
24
WORKDIR /app
19
25
20
- COPY rust-toolchain.toml rust-toolchain.toml
21
-
22
26
RUN rustup component add rustfmt
23
27
24
28
## Orchestrator builder #########################################################
25
29
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/
31
35
32
36
WORKDIR /app
33
37
0 commit comments