Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -9,7 +9,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
# Create directories with proper permissions
|
| 12 |
-
RUN mkdir -p /app/data/chroma_crop_rag
|
|
|
|
| 13 |
|
| 14 |
# Set HF_HOME
|
| 15 |
ENV HF_HOME=/app/cache
|
|
@@ -17,15 +18,15 @@ ENV HF_HOME=/app/cache
|
|
| 17 |
# Debug: List build context contents
|
| 18 |
RUN ls -la .
|
| 19 |
|
| 20 |
-
# Copy
|
| 21 |
# COPY chroma_crop_rag /app/data/chroma_crop_rag
|
| 22 |
COPY requirements.txt api.py config.py crop_disease_qa.json /app/
|
| 23 |
|
| 24 |
# Install dependencies
|
| 25 |
RUN pip install --no-cache-dir python-multipart -r requirements.txt
|
| 26 |
|
| 27 |
-
# Debug: List files to verify
|
| 28 |
-
RUN ls -la /app/data
|
| 29 |
|
| 30 |
EXPOSE 7860
|
| 31 |
CMD ["python", "api.py"]
|
|
|
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
# Create directories with proper permissions
|
| 12 |
+
RUN mkdir -p /app/data/chroma_crop_rag /app/cache && \
|
| 13 |
+
chmod -R 777 /app/data /app/cache
|
| 14 |
|
| 15 |
# Set HF_HOME
|
| 16 |
ENV HF_HOME=/app/cache
|
|
|
|
| 18 |
# Debug: List build context contents
|
| 19 |
RUN ls -la .
|
| 20 |
|
| 21 |
+
# Copy files (skip chroma_crop_rag if mounted at runtime)
|
| 22 |
# COPY chroma_crop_rag /app/data/chroma_crop_rag
|
| 23 |
COPY requirements.txt api.py config.py crop_disease_qa.json /app/
|
| 24 |
|
| 25 |
# Install dependencies
|
| 26 |
RUN pip install --no-cache-dir python-multipart -r requirements.txt
|
| 27 |
|
| 28 |
+
# Debug: List files and permissions to verify
|
| 29 |
+
RUN ls -la /app/data /app/cache
|
| 30 |
|
| 31 |
EXPOSE 7860
|
| 32 |
CMD ["python", "api.py"]
|