bla commited on
Commit
a60bdcb
·
verified ·
1 Parent(s): 84dd5e0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -4
Dockerfile CHANGED
@@ -1,10 +1,6 @@
1
  # Use official Python image
2
  FROM python:3.10-slim
3
 
4
- # Set environment variables
5
- ENV PYTHONDONTWRITEBYTECODE=1 \
6
- PYTHONUNBUFFERED=1
7
-
8
  # Set work directory
9
  WORKDIR /app
10
 
@@ -26,5 +22,9 @@ COPY . .
26
  # Expose the FastAPI port
27
  EXPOSE 7860
28
 
 
 
 
 
29
  # Start the FastAPI app
30
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  # Use official Python image
2
  FROM python:3.10-slim
3
 
 
 
 
 
4
  # Set work directory
5
  WORKDIR /app
6
 
 
22
  # Expose the FastAPI port
23
  EXPOSE 7860
24
 
25
+ ENV PYTHONDONTWRITEBYTECODE=1 \
26
+ PYTHONUNBUFFERED=1 \
27
+ XDG_CACHE_HOME=/app/.cache # Fix for permission denied in /.cache
28
+
29
  # Start the FastAPI app
30
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]