Spaces:
Build error
Build error
Upload folder using huggingface_hub
Browse files- Dockerfile +4 -6
Dockerfile
CHANGED
|
@@ -2,7 +2,7 @@ FROM python:3.12-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install dependencies
|
| 6 |
RUN pip install --no-cache-dir \
|
| 7 |
openenv-core \
|
| 8 |
fastapi \
|
|
@@ -18,13 +18,11 @@ RUN python -c "from transformers import AutoModelForCausalLM, AutoTokenizer; \
|
|
| 18 |
AutoTokenizer.from_pretrained('Qwen/Qwen2.5-1.5B-Instruct'); \
|
| 19 |
AutoModelForCausalLM.from_pretrained('Qwen/Qwen2.5-1.5B-Instruct')"
|
| 20 |
|
| 21 |
-
# Copy app code
|
| 22 |
COPY server/ server/
|
| 23 |
COPY models.py .
|
| 24 |
-
COPY
|
| 25 |
-
|
| 26 |
-
# Copy dashboard
|
| 27 |
-
COPY dashboard.html static/index.html
|
| 28 |
|
| 29 |
EXPOSE 7860
|
| 30 |
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install dependencies (torch CPU-only for inference)
|
| 6 |
RUN pip install --no-cache-dir \
|
| 7 |
openenv-core \
|
| 8 |
fastapi \
|
|
|
|
| 18 |
AutoTokenizer.from_pretrained('Qwen/Qwen2.5-1.5B-Instruct'); \
|
| 19 |
AutoModelForCausalLM.from_pretrained('Qwen/Qwen2.5-1.5B-Instruct')"
|
| 20 |
|
| 21 |
+
# Copy app code (paths relative to HF Space repo root)
|
| 22 |
COPY server/ server/
|
| 23 |
COPY models.py .
|
| 24 |
+
COPY serve.py .
|
| 25 |
+
COPY static/ static/
|
|
|
|
|
|
|
| 26 |
|
| 27 |
EXPOSE 7860
|
| 28 |
|