Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +14 -7
Dockerfile
CHANGED
|
@@ -1,14 +1,21 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
EXPOSE 7860
|
| 5 |
|
| 6 |
-
#
|
| 7 |
ENV VLLM_HOST=0.0.0.0
|
| 8 |
ENV VLLM_PORT=7860
|
| 9 |
-
ENV
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
|
| 12 |
-
# Run vLLM with env-based host and port
|
| 13 |
-
CMD ["vllm serve --model unsloth/llama-2-7b-bnb-4bit --host 0.0.0.0 --port 7860"]
|
| 14 |
|
|
|
|
| 1 |
+
FROM python:3.12-slim
|
| 2 |
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 5 |
+
|
| 6 |
+
# Install CPU-only PyTorch + vLLM
|
| 7 |
+
RUN pip install --no-cache-dir torch==2.4.0 --index-url https://download.pytorch.org/whl/cpu
|
| 8 |
+
RUN pip install --no-cache-dir vllm
|
| 9 |
+
|
| 10 |
+
# Expose port
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
+
# Env variables
|
| 14 |
ENV VLLM_HOST=0.0.0.0
|
| 15 |
ENV VLLM_PORT=7860
|
| 16 |
+
ENV HUGGING_FACE_HUB_TOKEN=<your_hf_token>
|
| 17 |
+
|
| 18 |
+
# Command to run vLLM on CPU
|
| 19 |
+
CMD ["sh", "-c", "vllm serve --model unsloth/llama-2-7b-bnb-4bit --device cpu --host $VLLM_HOST --port $VLLM_PORT"]
|
| 20 |
|
|
|
|
|
|
|
| 21 |
|