Spaces:
Build error
Build error
Hoon Kim
commited on
Commit
·
23df16c
1
Parent(s):
c531635
install vllm from source
Browse files- Dockerfile +15 -6
Dockerfile
CHANGED
|
@@ -2,6 +2,12 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
# Install system dependencies (probably more than needed)
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
|
@@ -56,6 +62,15 @@ RUN pip install \
|
|
| 56 |
transformers \
|
| 57 |
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
# Fix networkx compatibility
|
| 60 |
RUN pip install --force-reinstall networkx==3.2.1
|
| 61 |
|
|
@@ -69,11 +84,5 @@ RUN python -m unidic download
|
|
| 69 |
# Copy application files
|
| 70 |
COPY . .
|
| 71 |
|
| 72 |
-
# Environment variables for CPU-only operation
|
| 73 |
-
ENV CUDA_VISIBLE_DEVICES=-1 \
|
| 74 |
-
TF_CPP_MIN_LOG_LEVEL=3 \
|
| 75 |
-
SDL_AUDIODRIVER=disk \
|
| 76 |
-
VLLM_TARGET_DEVICE=cpu
|
| 77 |
-
|
| 78 |
EXPOSE 7860
|
| 79 |
CMD ["python", "app.py"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Environment variables for CPU-only operation
|
| 6 |
+
ENV CUDA_VISIBLE_DEVICES=-1 \
|
| 7 |
+
TF_CPP_MIN_LOG_LEVEL=3 \
|
| 8 |
+
SDL_AUDIODRIVER=disk \
|
| 9 |
+
VLLM_TARGET_DEVICE=cpu
|
| 10 |
+
|
| 11 |
# Install system dependencies (probably more than needed)
|
| 12 |
RUN apt-get update && apt-get install -y \
|
| 13 |
build-essential \
|
|
|
|
| 62 |
transformers \
|
| 63 |
--extra-index-url https://download.pytorch.org/whl/cpu
|
| 64 |
|
| 65 |
+
# Install vLLM CPU version from source
|
| 66 |
+
RUN git clone https://github.com/vllm-project/vllm.git \
|
| 67 |
+
&& cd vllm \
|
| 68 |
+
&& pip install -v -r requirements-cpu.txt --extra-index-url https://download.pytorch.org/whl/cpu \
|
| 69 |
+
&& python setup.py install \
|
| 70 |
+
&& pip install --no-cache-dir -e . \
|
| 71 |
+
&& cd .. \
|
| 72 |
+
&& rm -rf vllm
|
| 73 |
+
|
| 74 |
# Fix networkx compatibility
|
| 75 |
RUN pip install --force-reinstall networkx==3.2.1
|
| 76 |
|
|
|
|
| 84 |
# Copy application files
|
| 85 |
COPY . .
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
EXPOSE 7860
|
| 88 |
CMD ["python", "app.py"]
|