Skip to content

Commit f57f9df

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

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

deploy/Containerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,26 @@ FROM $BASE_IMAGE
2020
COPY --from=builder /opt/app-root/guidellm /opt/app-root/guidellm
2121

2222
# Add guidellm bin to PATH
23-
ENV PATH="/opt/app-root/guidellm/bin:$PATH"
23+
# Argument defaults can be set with GUIDELLM_<ARG>
24+
ENV HOME="/home/guidellm" \
25+
PATH="/opt/app-root/guidellm/bin:$PATH" \
26+
GUIDELLM_OUTPUT_PATH="/results/benchmarks.json"
2427

2528
# Create a non-root user
26-
RUN useradd -md /results guidellm
29+
RUN useradd -Md $HOME -g root guidellm
2730

2831
# Switch to non-root user
2932
USER guidellm
3033

31-
# Set working directory
32-
WORKDIR /results
34+
# Create the user home dir
35+
WORKDIR $HOME
36+
37+
# Create a volume for results
38+
VOLUME /results
3339

3440
# Metadata
3541
LABEL org.opencontainers.image.source="https://github.com/vllm-project/guidellm" \
3642
org.opencontainers.image.description="GuideLLM Performance Benchmarking Container"
3743

38-
# Argument defaults can be set with GUIDELLM_<ARG>
39-
ENV GUIDELLM_OUTPUT_PATH="/results/benchmarks.json"
40-
4144
ENTRYPOINT [ "/opt/app-root/guidellm/bin/guidellm" ]
4245
CMD [ "benchmark", "run" ]

0 commit comments

Comments
 (0)