Skip to content

Commit cceadb5

Browse files
committed
Integrate changes from vllm-project#213
1 parent ba1dba7 commit cceadb5

File tree

1 file changed

+16
-22
lines changed

1 file changed

+16
-22
lines changed

deploy/Containerfile

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
ARG PYTHON=3.13
1+
ARG BASE_IMAGE=docker.io/python:3.13-slim
22

33
# Use a multi-stage build to create a lightweight production image
4-
FROM docker.io/python:${PYTHON}-slim as builder
4+
FROM $BASE_IMAGE as builder
5+
6+
# Ensure files are installed as root
7+
USER root
58

69
# Copy repository files
7-
COPY / /src
10+
COPY / /opt/app-root/src
811

912
# Create a venv and install guidellm
10-
RUN python3 -m venv /opt/guidellm \
11-
&& /opt/guidellm/bin/pip install --no-cache-dir /src
12-
13-
# Copy entrypoint script into the venv bin directory
14-
RUN install -m0755 /src/deploy/entrypoint.sh /opt/guidellm/bin/entrypoint.sh
13+
RUN python3 -m venv /opt/app-root/guidellm \
14+
&& /opt/app-root/guidellm/bin/pip install --no-cache-dir /opt/app-root/src
1515

1616
# Prod image
17-
FROM docker.io/python:${PYTHON}-slim
17+
FROM $BASE_IMAGE
1818

1919
# Copy the virtual environment from the builder stage
20-
COPY --from=builder /opt/guidellm /opt/guidellm
20+
COPY --from=builder /opt/app-root/guidellm /opt/app-root/guidellm
2121

2222
# Add guidellm bin to PATH
23-
ENV PATH="/opt/guidellm/bin:$PATH"
23+
ENV PATH="/opt/app-root/guidellm/bin:$PATH"
2424

2525
# Create a non-root user
2626
RUN useradd -md /results guidellm
@@ -35,14 +35,8 @@ WORKDIR /results
3535
LABEL org.opencontainers.image.source="https://github.com/vllm-project/guidellm" \
3636
org.opencontainers.image.description="GuideLLM Performance Benchmarking Container"
3737

38-
# Set the environment variable for the benchmark script
39-
# TODO: Replace with scenario environment variables
40-
ENV GUIDELLM_TARGET="http://localhost:8000" \
41-
GUIDELLM_MODEL="neuralmagic/Meta-Llama-3.1-8B-Instruct-quantized.w4a16" \
42-
GUIDELLM_RATE_TYPE="sweep" \
43-
GUIDELLM_DATA="prompt_tokens=256,output_tokens=128" \
44-
GUIDELLM_MAX_REQUESTS="100" \
45-
GUIDELLM_MAX_SECONDS="" \
46-
GUIDELLM_OUTPUT_PATH="/results/results.json"
47-
48-
ENTRYPOINT [ "/opt/guidellm/bin/guidellm" ]
38+
# Argument defaults can be set with GUIDELLM_<ARG>
39+
ENV GUIDELLM_OUTPUT_PATH="/results/benchmarks.json"
40+
41+
ENTRYPOINT [ "/opt/app-root/guidellm/bin/guidellm" ]
42+
CMD [ "benchmark", "run" ]

0 commit comments

Comments
 (0)