Spaces:
Sleeping
Sleeping
fix: add root Dockerfile for HF Spaces (requires Dockerfile at repo root)
Browse filesCo-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Dockerfile +25 -0
Dockerfile
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
# HF Spaces requires user ID 1000
|
| 4 |
+
RUN useradd -m -u 1000 user
|
| 5 |
+
WORKDIR /home/user/app
|
| 6 |
+
|
| 7 |
+
# Copy source and install
|
| 8 |
+
COPY --chown=user pyproject.toml .
|
| 9 |
+
COPY --chown=user agent_bench/ agent_bench/
|
| 10 |
+
COPY --chown=user configs/ configs/
|
| 11 |
+
COPY --chown=user data/ data/
|
| 12 |
+
COPY --chown=user scripts/ scripts/
|
| 13 |
+
|
| 14 |
+
RUN pip install --no-cache-dir .
|
| 15 |
+
|
| 16 |
+
# Pre-download models at build time
|
| 17 |
+
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('all-MiniLM-L6-v2')"
|
| 18 |
+
RUN python -c "from sentence_transformers import CrossEncoder; CrossEncoder('cross-encoder/ms-marco-MiniLM-L-6-v2')"
|
| 19 |
+
|
| 20 |
+
# Run ingestion at build time so the store is ready
|
| 21 |
+
RUN python scripts/ingest.py --doc-dir data/tech_docs/ --store-path .cache/store
|
| 22 |
+
|
| 23 |
+
USER user
|
| 24 |
+
EXPOSE 7860
|
| 25 |
+
CMD ["uvicorn", "agent_bench.serving.app:create_app", "--factory", "--host", "0.0.0.0", "--port", "7860"]
|