Skip to content

Commit 3604c63

Browse files
committed
Make container more k8s friendly
1 parent d8f5688 commit 3604c63

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

deploy/Containerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,22 @@ COPY --from=builder /opt/app-root/guidellm /opt/app-root/guidellm
2222
# Add guidellm bin to PATH
2323
ENV PATH="/opt/app-root/guidellm/bin:$PATH"
2424

25-
# Create a non-root user
26-
RUN useradd -md /results guidellm
27-
2825
# Switch to non-root user
29-
USER guidellm
26+
USER guidellm:guidellm
27+
28+
# Create the user home dir
29+
WORKDIR /home/guidellm
3030

31-
# Set working directory
32-
WORKDIR /results
31+
# Create a volume for results
32+
VOLUME /results
3333

3434
# Metadata
3535
LABEL org.opencontainers.image.source="https://github.com/vllm-project/guidellm" \
3636
org.opencontainers.image.description="GuideLLM Performance Benchmarking Container"
3737

3838
# Argument defaults can be set with GUIDELLM_<ARG>
39-
ENV GUIDELLM_OUTPUT_PATH="/results/benchmarks.json"
39+
ENV HOME="/home/guidellm" \
40+
GUIDELLM_OUTPUT_PATH="/results/benchmarks.json"
4041

4142
ENTRYPOINT [ "/opt/app-root/guidellm/bin/guidellm" ]
4243
CMD [ "benchmark", "run" ]

0 commit comments

Comments
 (0)