Skip to content
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

[Misc] Enhance ppc64le Dockerfile with UBI9 Integration and Non-Root User Context #133

Closed
wants to merge 1 commit into from
Closed
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
28 changes: 27 additions & 1 deletion Dockerfile.ppc64le
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM mambaorg/micromamba
# Stage 1: Build Stage with Micromamba
FROM mambaorg/micromamba AS builder
ARG MAMBA_DOCKERFILE_ACTIVATE=1
USER root

Expand All @@ -16,7 +17,32 @@ WORKDIR /workspace/vllm
# These packages will be in rocketce eventually
RUN pip install -v -r requirements-cpu.txt --prefer-binary --extra-index-url https://repo.fury.io/mgiessing

# Build the application
RUN VLLM_TARGET_DEVICE=cpu python3 setup.py install

# Stage 2: Final Stage with UBI 9
FROM registry.access.redhat.com/ubi9/ubi:latest
USER root

# Copy necessary files from the builder stage
COPY --from=builder /opt/conda /opt/conda
COPY --from=builder /workspace/vllm /workspace/vllm

# Set the working directory for runtime
WORKDIR /vllm-workspace

# Set up the environment for the non-root user
RUN umask 002 \
&& mkdir -p /home/vllm \
&& useradd --uid 2000 --gid 0 vllm \
&& chmod g+rwx $HOME /usr/src /vllm-workspace

# Set environment variables
ENV HF_HUB_OFFLINE=1 \
PORT=8000 \
HOME=/home/vllm \
VLLM_USAGE_SOURCE=production-docker-image \
VLLM_WORKER_MULTIPROC_METHOD=fork

# Define the entrypoint for the container
ENTRYPOINT ["/opt/conda/bin/python3", "-m", "vllm.entrypoints.openai.api_server"]
Loading