Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
@@ -25,8 +25,7 @@ RUN chown -R appuser:appuser /app
|
|
25 |
# Set the HOME environment variable for the user
|
26 |
ENV HOME=/app
|
27 |
|
28 |
-
#
|
29 |
-
# This is the cleanest way to solve the "not writeable" warning.
|
30 |
ENV YOLO_CONFIG_DIR=/tmp
|
31 |
|
32 |
# Switch to the non-root user
|
@@ -37,5 +36,7 @@ EXPOSE 8501
|
|
37 |
|
38 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
39 |
|
40 |
-
#
|
41 |
-
|
|
|
|
|
|
25 |
# Set the HOME environment variable for the user
|
26 |
ENV HOME=/app
|
27 |
|
28 |
+
# Tell Ultralytics to use the /tmp directory for its config
|
|
|
29 |
ENV YOLO_CONFIG_DIR=/tmp
|
30 |
|
31 |
# Switch to the non-root user
|
|
|
36 |
|
37 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
|
38 |
|
39 |
+
# --- FINAL UPDATED ENTRYPOINT ---
|
40 |
+
# Added `--server.headless=true` to make Streamlit compatible with the Hugging Face proxy.
|
41 |
+
# This fixes the 403 Forbidden error on file uploads.
|
42 |
+
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--browser.gatherUsageStats=false", "--server.headless=true"]
|