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

[Hardware][PowerPC] Adding UBI 9 based vLLM Dockerfile for Power architecture #207

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
49 changes: 49 additions & 0 deletions Dockerfile.ppc64le.ubi
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM registry.access.redhat.com/ubi9/ubi:latest
USER root

ENV MAMBA_ROOT_PREFIX=~/micromamba
ENV PATH=/root/micromamba/bin:$PATH
ENV CMAKE_PREFIX_PATH=/root/micromamba

RUN dnf install g++ gcc-toolset-12* git protobuf-* bzip2 libtool autoconf -y
WORKDIR /workspace/

# Install numctl library
RUN git clone -b v2.0.16 --single-branch https://github.com/numactl/numactl
RUN cd /workspace/numactl && ./autogen.sh && ./configure && make install

# Install and setup Micromamba
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-ppc64le/latest | tar -xvj bin/micromamba \
&& mv bin/micromamba /usr/local/bin/ \
&& micromamba shell init -s bash -r ~/micromamba && source ~/.bashrc \
&& micromamba activate

# Install dependencies
RUN micromamba install -y -n base -c https://ftp.osuosl.org/pub/open-ce/1.11.0-p10/ -c defaults python=3.10 torchvision-cpu=0.16.2 rust \
&& micromamba clean --all --yes

COPY ./ /workspace/vllm
WORKDIR /workspace/vllm

RUN pip install -v --prefer-binary --extra-index-url https://repo.fury.io/mgiessing \
cmake>=3.26 ninja packaging setuptools-scm>=8 wheel jinja2 \
torch==2.3.1 \
-r requirements-cpu.txt \
xformers uvloop==0.20.0

RUN VLLM_TARGET_DEVICE=cpu python3 setup.py develop

# 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 /workspace/vllm

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

ENTRYPOINT ["/root/micromamba/bin/python3", "-m", "vllm.entrypoints.openai.api_server"]