binary1ne commited on
Commit
28e546f
·
verified ·
1 Parent(s): d8f814e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -7
Dockerfile CHANGED
@@ -1,14 +1,21 @@
1
- FROM vllm/vllm-openai:latest
2
 
3
- # Expose your desired port
 
 
 
 
 
 
 
4
  EXPOSE 7860
5
 
6
- # Environment variables for host/port
7
  ENV VLLM_HOST=0.0.0.0
8
  ENV VLLM_PORT=7860
9
- ENV VLLM_LOGGING_LEVEL=DEBUG
10
- ENV VLLM_DEVICE=cpu
 
 
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