Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
|
@@ -8,10 +8,13 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
ninja-build \
|
| 9 |
cmake \
|
| 10 |
python3-dev \
|
| 11 |
-
gcc \
|
|
|
|
| 12 |
g++ \
|
| 13 |
libnuma-dev \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Step 3 β Environment for CPU build
|
| 17 |
ENV VLLM_TARGET_DEVICE=cpu
|
|
@@ -21,14 +24,17 @@ WORKDIR /workspace
|
|
| 21 |
RUN git clone https://github.com/vllm-project/vllm.git
|
| 22 |
|
| 23 |
# Step 5 β Install Python build tools
|
|
|
|
|
|
|
| 24 |
RUN pip install --upgrade pip setuptools wheel packaging setuptools_scm
|
| 25 |
|
| 26 |
# Step 6 β Install PyTorch CPU before building vLLM
|
| 27 |
RUN pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
|
| 28 |
|
|
|
|
| 29 |
# Step 7 β Install vLLM requirements for CPU
|
| 30 |
WORKDIR /workspace/vllm
|
| 31 |
-
RUN pip install -r requirements/cpu.txt
|
| 32 |
|
| 33 |
# Step 8 β Build and install vLLM from source
|
| 34 |
RUN python setup.py install
|
|
|
|
| 8 |
ninja-build \
|
| 9 |
cmake \
|
| 10 |
python3-dev \
|
| 11 |
+
gcc-12 \
|
| 12 |
+
g++-12 \
|
| 13 |
g++ \
|
| 14 |
libnuma-dev \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
+
|
| 17 |
+
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 10 --slave /usr/bin/g++ g++ /usr/bin/g++-12
|
| 18 |
|
| 19 |
# Step 3 β Environment for CPU build
|
| 20 |
ENV VLLM_TARGET_DEVICE=cpu
|
|
|
|
| 24 |
RUN git clone https://github.com/vllm-project/vllm.git
|
| 25 |
|
| 26 |
# Step 5 β Install Python build tools
|
| 27 |
+
RUN pip install --upgrade pip
|
| 28 |
+
RUN pip install cmake>=3.26 wheel packaging ninja "setuptools-scm>=8" numpy
|
| 29 |
RUN pip install --upgrade pip setuptools wheel packaging setuptools_scm
|
| 30 |
|
| 31 |
# Step 6 β Install PyTorch CPU before building vLLM
|
| 32 |
RUN pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
|
| 33 |
|
| 34 |
+
|
| 35 |
# Step 7 β Install vLLM requirements for CPU
|
| 36 |
WORKDIR /workspace/vllm
|
| 37 |
+
RUN pip install -r requirements/cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu
|
| 38 |
|
| 39 |
# Step 8 β Build and install vLLM from source
|
| 40 |
RUN python setup.py install
|