JossyJoe commited on
Commit
c7a0991
1 Parent(s): 7c77d57

allow gradio to write

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -0
Dockerfile CHANGED
@@ -14,5 +14,11 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
  # Copy the application code
15
  COPY --chown=user ./main.py /app/main.py
16
 
 
 
 
 
 
 
17
  # Command to run the application
18
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
14
  # Copy the application code
15
  COPY --chown=user ./main.py /app/main.py
16
 
17
+ # Create a directory for Gradio flagging and ensure the user has write permissions
18
+ RUN mkdir -p /app/flagged && chown -R user:user /app/flagged
19
+
20
+ # Switch to the created user
21
+ USER user
22
+
23
  # Command to run the application
24
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]