-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile.konflux
More file actions
61 lines (45 loc) · 3.2 KB
/
Copy pathDockerfile.konflux
File metadata and controls
61 lines (45 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ARG UBI_MINIMAL_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal
ARG UBI_BASE_IMAGE_TAG=latest
## Rust builder ################################################################
FROM ${UBI_MINIMAL_BASE_IMAGE}:${UBI_BASE_IMAGE_TAG} AS rust-builder
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
RUN microdnf install --disableplugin=subscription-manager -y \
rust \
cargo \
gcc \
ca-certificates \
openssl-devel && \
microdnf clean all
## Gateway builder #########################################################
FROM rust-builder AS gateway-builder
COPY .cargo/config.toml /app/.cargo/config.toml
COPY *.toml Cargo.lock /app/
COPY src/ /app/src/
WORKDIR /app
RUN cargo install --root /app/ --path .
## Tests stage ##################################################################
FROM gateway-builder AS tests
RUN cargo test
## Lint stage ###################################################################
FROM gateway-builder AS lint
RUN cargo clippy --all-targets --all-features -- -D warnings
## Formatting check stage #######################################################
FROM gateway-builder AS format
RUN cargo fmt --check
## Release Image ################################################################
FROM ${UBI_MINIMAL_BASE_IMAGE}:${UBI_BASE_IMAGE_TAG} AS gateway-release
ENV GATEWAY_CONFIG=/app/config/config.yaml
COPY config/config.yaml /app/config/config.yaml
COPY --from=gateway-builder /app/bin/ /app/bin/
RUN microdnf install -y --disableplugin=subscription-manager \
shadow-utils \
openssl-libs && \
microdnf clean all --disableplugin=subscription-manager
CMD ["/app/bin/vllm-orchestrator-gateway"]
LABEL name="rhoai/odh-trustyai-vllm-orchestrator-gateway-rhel9" \
com.redhat.component="odh-trustyai-vllm-orchestrator-gateway-rhel9" \
io.k8s.display-name="odh-trustyai-vllm-orchestrator-gateway-rhel9" \
io.k8s.description="The vLLM Orchestrator Gateway serves as ant HTTP gateway that provides multiple OpenAI-compatible chat completion endpoints with configurable detector-based filtering, routing client requests to a backend orchestrator while adding specific detector configurations per route. It acts as a routing layer that transforms standard chat completion requests by injecting detector specifications and fallback messages, enabling route-specific content filtering policies through a simple REST API gateway pattern." \
description="The vLLM Orchestrator Gateway serves as ant HTTP gateway that provides multiple OpenAI-compatible chat completion endpoints with configurable detector-based filtering, routing client requests to a backend orchestrator while adding specific detector configurations per route. It acts as a routing layer that transforms standard chat completion requests by injecting detector specifications and fallback messages, enabling route-specific content filtering policies through a simple REST API gateway pattern." \
summary="The vLLM Orchestrator Gateway is an OpenAI-compatible REST gateway that routes chat requests with configurable detector-based filtering and route-specific safety policies." \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"