Spaces:
Sleeping
Sleeping
Commit ·
412f652
1
Parent(s): 997fa91
fix : Permission denied: /.cache
Browse files- Dockerfile +3 -0
Dockerfile
CHANGED
|
@@ -16,5 +16,8 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 16 |
# 複製專案檔案
|
| 17 |
COPY . .
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
# FastAPI 使用 uvicorn 啟動
|
| 20 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 16 |
# 複製專案檔案
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
+
# 建立快取資料夾並開放權限
|
| 20 |
+
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
|
| 21 |
+
|
| 22 |
# FastAPI 使用 uvicorn 啟動
|
| 23 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|