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