forked from llm-d/llm-d-inference-scheduler
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathDockerfile.epp
More file actions
61 lines (47 loc) · 2.01 KB
/
Dockerfile.epp
File metadata and controls
61 lines (47 loc) · 2.01 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
## Minimal runtime Dockerfile (microdnf-only, no torch, wrapper in site-packages)
## Simplified EPP Dockerfile - UDS tokenizer only (no vLLM, no embedded tokenizer)
## This build uses the default kv-cache pool (UDS-only, no embedded_tokenizers build tag)
## Tokenization is handled by a separate UDS tokenizer sidecar container
##
## CGO is still required for ZMQ (kvevents) but Python/vLLM dependencies are removed
# Go build stage
FROM quay.io/projectquay/golang:1.25 AS go-builder
ARG TARGETOS
ARG TARGETARCH
WORKDIR /workspace
# Install ZMQ development libraries (required for CGO)
# The builder is based on UBI8, so we need epel-release-8
RUN dnf install -y 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm' && \
dnf install -y zeromq-devel pkgconfig && \
dnf clean all
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# Copy the go source
COPY cmd/ cmd/
COPY pkg/ pkg/
RUN go mod download
# Build EPP with CGO for ZMQ only (no Python, no embedded tokenizer)
# The default kv-cache build uses UDS tokenizer (//go:build !embedded_tokenizers)
RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o bin/epp cmd/epp/main.go
# Runtime stage
# Use ubi9 as a minimal base image to package the manager binary
# Refer to https://catalog.redhat.com/software/containers/ubi9/ubi-minimal/615bd9b4075b022acc111bf5 for more details
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7
WORKDIR /
# Install ZMQ runtime library only (no Python needed)
RUN curl -L -o /tmp/epel-release.rpm https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
rpm -i /tmp/epel-release.rpm && \
rm /tmp/epel-release.rpm && \
microdnf install -y --setopt=install_weak_deps=0 zeromq && \
microdnf clean all && \
rm -rf /var/cache/yum /var/lib/yum
COPY --from=go-builder /workspace/bin/epp /app/epp
USER 65532:65532
# expose gRPC, health and metrics ports
EXPOSE 9002
EXPOSE 9003
EXPOSE 9090
# expose port for KV-Events ZMQ SUB socket
EXPOSE 5557
ENTRYPOINT ["/app/epp"]