Skip to content

WIP: Make container more OCP friendly #254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .containerignore
17 changes: 10 additions & 7 deletions deploy/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,26 @@ FROM $BASE_IMAGE
COPY --from=builder /opt/app-root/guidellm /opt/app-root/guidellm

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

# Create a non-root user
RUN useradd -md /results guidellm
RUN useradd -Md $HOME -g root guidellm

# Switch to non-root user
USER guidellm

# Set working directory
WORKDIR /results
# Create the user home dir
WORKDIR $HOME

# Create a volume for results
VOLUME /results

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

# Argument defaults can be set with GUIDELLM_<ARG>
ENV GUIDELLM_OUTPUT_PATH="/results/benchmarks.json"

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