-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile.spyre
35 lines (30 loc) · 1.55 KB
/
Dockerfile.spyre
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Global Args #################################################################
ARG BASE_UBI_IMAGE_TAG=9.4
ARG PYTHON_VERSION=3.12
# Base Layer ##################################################################
FROM registry.access.redhat.com/ubi9/ubi-minimal:${BASE_UBI_IMAGE_TAG} AS base
ARG PYTHON_VERSION
ENV PYTHON_VERSION=${PYTHON_VERSION}
WORKDIR /workspace
# Install some basic utilities ##################################################################
RUN microdnf update -y && microdnf install -y \
python${PYTHON_VERSION}-devel python${PYTHON_VERSION}-pip python${PYTHON_VERSION}-wheel git vim gcc g++ kmod\
&& microdnf clean all
RUN ln -sf $(which python${PYTHON_VERSION}) /usr/bin/python && \
ln -sf $(which pip${PYTHON_VERSION}) /usr/bin/pip
# Download and install vllm ###########################################################
RUN git clone --depth 1 https://github.com/vllm-project/vllm.git \
&& cd vllm \
&& git fetch --tags \
&& git checkout v0.8.0 \
&& python -m pip install --upgrade pip \
&& pip3 install torch=="2.5.1+cpu" --index-url https://download.pytorch.org/whl/cpu \
&& python use_existing_torch.py \
&& pip install -r requirements/build.txt \
&& SETUPTOOLS_SCM_PRETEND_VERSION=0.8.0 VLLM_TARGET_DEVICE=empty pip install --verbose . --no-build-isolation
# Install vllm Spyre plugin ##################################################################
RUN mkdir /workspace/vllm-spyre
COPY . /workspace/vllm-spyre
RUN cd /workspace/vllm-spyre && pip install -v -e .
ENV VLLM_PLUGINS=spyre
CMD ["/bin/bash"]