Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +24 -0
Dockerfile
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
+
|
3 |
+
# Install system deps for llama-cpp
|
4 |
+
RUN apt-get update && apt-get install -y build-essential cmake
|
5 |
+
|
6 |
+
# Create app dir
|
7 |
+
WORKDIR /app
|
8 |
+
|
9 |
+
# Copy requirements and install
|
10 |
+
COPY app/requirements.txt .
|
11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
+
|
13 |
+
# Copy the app
|
14 |
+
COPY app/ .
|
15 |
+
|
16 |
+
# Download model into container (or mount if too large)
|
17 |
+
RUN mkdir -p /models
|
18 |
+
# Example: If model is from HF Hub
|
19 |
+
# RUN pip install huggingface_hub
|
20 |
+
# RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='YourRepo/Qwen', filename='qwen2.5b.gguf', local_dir='/models')"
|
21 |
+
|
22 |
+
# Start API
|
23 |
+
ENV PORT=7860
|
24 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|