Spaces:
Sleeping
Sleeping
Commit
·
ee5a5e7
1
Parent(s):
6bba864
Upd DF
Browse files- Dockerfile +3 -2
- requirements.txt +13 -13
Dockerfile
CHANGED
|
@@ -21,7 +21,7 @@ WORKDIR /app
|
|
| 21 |
COPY . .
|
| 22 |
|
| 23 |
# Install Python dependencies
|
| 24 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
# Hugging Face cache directories
|
| 27 |
ENV HF_HOME="/home/user/.cache/huggingface"
|
|
@@ -37,7 +37,8 @@ ENV PRELOAD_TRANSLATORS="0"
|
|
| 37 |
ENV EMBEDDING_HALF="0"
|
| 38 |
|
| 39 |
# Preload embedding model and warmup
|
| 40 |
-
RUN
|
|
|
|
| 41 |
|
| 42 |
# Ensure ownership stays correct
|
| 43 |
RUN chown -R user:user /app/model_cache
|
|
|
|
| 21 |
COPY . .
|
| 22 |
|
| 23 |
# Install Python dependencies
|
| 24 |
+
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
| 25 |
|
| 26 |
# Hugging Face cache directories
|
| 27 |
ENV HF_HOME="/home/user/.cache/huggingface"
|
|
|
|
| 37 |
ENV EMBEDDING_HALF="0"
|
| 38 |
|
| 39 |
# Preload embedding model and warmup
|
| 40 |
+
RUN test -f /app/dw_model.py && python /app/dw_model.py || true
|
| 41 |
+
RUN test -f /app/warmup.py && python /app/warmup.py || true
|
| 42 |
|
| 43 |
# Ensure ownership stays correct
|
| 44 |
RUN chown -R user:user /app/model_cache
|
requirements.txt
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
-
fastapi
|
| 2 |
-
uvicorn[standard]
|
| 3 |
-
python-multipart
|
| 4 |
-
pymongo
|
| 5 |
-
httpx
|
| 6 |
-
python-docx
|
| 7 |
-
PyMuPDF
|
| 8 |
-
pillow
|
| 9 |
-
transformers
|
| 10 |
-
torch
|
| 11 |
-
sentence-transformers
|
| 12 |
-
sumy
|
| 13 |
-
numpy
|
|
|
|
| 1 |
+
fastapi==0.114.2
|
| 2 |
+
uvicorn[standard]==0.30.6
|
| 3 |
+
python-multipart==0.0.9
|
| 4 |
+
pymongo==4.8.0
|
| 5 |
+
httpx==0.27.2
|
| 6 |
+
python-docx==1.1.2
|
| 7 |
+
PyMuPDF==1.24.10
|
| 8 |
+
pillow==10.4.0
|
| 9 |
+
transformers==4.44.2
|
| 10 |
+
torch==2.4.0
|
| 11 |
+
sentence-transformers==3.1.1
|
| 12 |
+
sumy==0.11.0
|
| 13 |
+
numpy==1.26.4
|