Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -37,11 +37,14 @@ COPY tests/ /app/tests/
|
|
| 37 |
# Copy data files with correct permissions
|
| 38 |
COPY --chown=1000:1000 data/ /app/data/
|
| 39 |
|
| 40 |
-
#
|
|
|
|
|
|
|
|
|
|
| 41 |
RUN python -c "\
|
| 42 |
import os, json; \
|
| 43 |
assert os.path.exists('/app/data/rupeia_document.json'), 'Data file missing'; \
|
| 44 |
-
|
| 45 |
"
|
| 46 |
|
| 47 |
# Download models during build
|
|
|
|
| 37 |
# Copy data files with correct permissions
|
| 38 |
COPY --chown=1000:1000 data/ /app/data/
|
| 39 |
|
| 40 |
+
# Debug: List files in /app/data/
|
| 41 |
+
RUN ls -l /app/data/
|
| 42 |
+
|
| 43 |
+
# Verify data files or create chat_history.json if missing
|
| 44 |
RUN python -c "\
|
| 45 |
import os, json; \
|
| 46 |
assert os.path.exists('/app/data/rupeia_document.json'), 'Data file missing'; \
|
| 47 |
+
if not os.path.exists('/app/data/chat_history.json'): open('/app/data/chat_history.json', 'w').write('{}') \
|
| 48 |
"
|
| 49 |
|
| 50 |
# Download models during build
|