Spaces:
Sleeping
Sleeping
allow gradio to write
Browse files- 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"]
|