Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -1
Dockerfile
CHANGED
|
@@ -8,10 +8,15 @@ WORKDIR /app
|
|
| 8 |
COPY requirements.txt requirements.txt
|
| 9 |
COPY app.py app.py
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
# Install Dependencies
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
-
# Expose Port 7860 (
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
# Start FastAPI Server
|
|
|
|
| 8 |
COPY requirements.txt requirements.txt
|
| 9 |
COPY app.py app.py
|
| 10 |
|
| 11 |
+
# ✅ Create Writable Cache Directory
|
| 12 |
+
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 13 |
+
ENV TRANSFORMERS_CACHE="/app/cache"
|
| 14 |
+
ENV HF_HOME="/app/cache"
|
| 15 |
+
|
| 16 |
# Install Dependencies
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
+
# Expose Port 7860 (Required by Hugging Face)
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
# Start FastAPI Server
|