Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
|
@@ -18,6 +18,14 @@ ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
|
|
| 18 |
STREAMLIT_SERVER_PORT=7860 \
|
| 19 |
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
|
| 20 |
STREAMLIT_SERVER_HEADLESS=true \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
PYTHONUNBUFFERED=1 \
|
| 22 |
PYTHONDONTWRITEBYTECODE=1
|
| 23 |
|
|
|
|
| 18 |
STREAMLIT_SERVER_PORT=7860 \
|
| 19 |
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
|
| 20 |
STREAMLIT_SERVER_HEADLESS=true \
|
| 21 |
+
# HF Spaces serves Streamlit inside an iframe at *.hf.space while the
|
| 22 |
+
# parent page lives at huggingface.co/spaces. The browser drops Streamlit's
|
| 23 |
+
# XSRF cookie on cross-origin XHRs, so st.file_uploader gets a 403 from
|
| 24 |
+
# /_stcore/upload_file (surfaces in the UI as `AxiosError 403`). CORS
|
| 25 |
+
# check has the same root cause. Disable both — there's no untrusted
|
| 26 |
+
# origin in this deployment shape anyway.
|
| 27 |
+
STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false \
|
| 28 |
+
STREAMLIT_SERVER_ENABLE_CORS=false \
|
| 29 |
PYTHONUNBUFFERED=1 \
|
| 30 |
PYTHONDONTWRITEBYTECODE=1
|
| 31 |
|