Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
|
@@ -5,10 +5,13 @@ WORKDIR /app
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
# π Ensure the custom cache folder exists
|
| 11 |
RUN mkdir -p /app/cache
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
EXPOSE 7860
|
| 14 |
CMD ["uvicorn", "llm_service:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
|
| 8 |
+
# π Create custom cache directory with proper permissions
|
|
|
|
|
|
|
| 9 |
RUN mkdir -p /app/cache
|
| 10 |
|
| 11 |
+
# π Set TRANSFORMERS_CACHE permanently
|
| 12 |
+
ENV TRANSFORMERS_CACHE=/app/cache
|
| 13 |
+
|
| 14 |
+
COPY llm_service.py .
|
| 15 |
+
|
| 16 |
EXPOSE 7860
|
| 17 |
CMD ["uvicorn", "llm_service:app", "--host", "0.0.0.0", "--port", "7860"]
|