mbochniak01 Claude Sonnet 4.6 commited on
Commit ·
1ea03d4
1
Parent(s): cbb4147
Speed up Docker builds: .dockerignore + merge model download layers
Browse files.dockerignore excludes eval/, scripts/, tests/, data/, zips, and docs
so COPY steps only transfer what the app actually needs.
Merged two model-download RUN commands into one layer — fewer layers,
less cache store overhead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- .dockerignore +10 -0
- Dockerfile +4 -2
.dockerignore
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
eval/
|
| 2 |
+
scripts/
|
| 3 |
+
tests/
|
| 4 |
+
client/
|
| 5 |
+
data/
|
| 6 |
+
*.zip
|
| 7 |
+
*.md
|
| 8 |
+
*.toml
|
| 9 |
+
*.ini
|
| 10 |
+
Makefile
|
Dockerfile
CHANGED
|
@@ -11,8 +11,10 @@ COPY requirements.txt .
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
# Pre-download models so first request isn't slow on HF Spaces
|
| 14 |
-
RUN python -c "
|
| 15 |
-
|
|
|
|
|
|
|
| 16 |
|
| 17 |
COPY knowledge/ ./knowledge/
|
| 18 |
COPY backend/ ./backend/
|
|
|
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
# Pre-download models so first request isn't slow on HF Spaces
|
| 14 |
+
RUN python -c "\
|
| 15 |
+
from sentence_transformers import SentenceTransformer, CrossEncoder; \
|
| 16 |
+
SentenceTransformer('all-MiniLM-L6-v2'); \
|
| 17 |
+
CrossEncoder('vectara/hallucination_evaluation_model', trust_remote_code=True)"
|
| 18 |
|
| 19 |
COPY knowledge/ ./knowledge/
|
| 20 |
COPY backend/ ./backend/
|