Spaces:
Paused
Paused
Disable stream proxy on Hugging Face Spaces
Browse files- Dockerfile +3 -1
- scripts/huggingface/entrypoint.py +1 -1
Dockerfile
CHANGED
|
@@ -85,7 +85,9 @@ ENV PORT=7860
|
|
| 85 |
ENV SERVER_PORT=7860
|
| 86 |
ENV DEFAULT_FASTAPI_PORT=7860
|
| 87 |
ENV DEFAULT_CAMOUFOX_PORT=9222
|
| 88 |
-
|
|
|
|
|
|
|
| 89 |
ENV SERVER_LOG_LEVEL=INFO
|
| 90 |
ENV DEBUG_LOGS_ENABLED=false
|
| 91 |
ENV AUTO_CONFIRM_LOGIN=true
|
|
|
|
| 85 |
ENV SERVER_PORT=7860
|
| 86 |
ENV DEFAULT_FASTAPI_PORT=7860
|
| 87 |
ENV DEFAULT_CAMOUFOX_PORT=9222
|
| 88 |
+
# Hugging Face Spaces may pause apps that expose an HTTP CONNECT proxy.
|
| 89 |
+
# Disable the internal stream proxy by default for Spaces deployments.
|
| 90 |
+
ENV STREAM_PORT=0
|
| 91 |
ENV SERVER_LOG_LEVEL=INFO
|
| 92 |
ENV DEBUG_LOGS_ENABLED=false
|
| 93 |
ENV AUTO_CONFIRM_LOGIN=true
|
scripts/huggingface/entrypoint.py
CHANGED
|
@@ -110,7 +110,7 @@ def main() -> None:
|
|
| 110 |
write_api_keys()
|
| 111 |
|
| 112 |
server_port = os.environ.get("PORT") or os.environ.get("SERVER_PORT") or "7860"
|
| 113 |
-
stream_port = os.environ.get("STREAM_PORT", "
|
| 114 |
|
| 115 |
os.environ["PORT"] = server_port
|
| 116 |
os.environ["SERVER_PORT"] = server_port
|
|
|
|
| 110 |
write_api_keys()
|
| 111 |
|
| 112 |
server_port = os.environ.get("PORT") or os.environ.get("SERVER_PORT") or "7860"
|
| 113 |
+
stream_port = os.environ.get("STREAM_PORT", "0")
|
| 114 |
|
| 115 |
os.environ["PORT"] = server_port
|
| 116 |
os.environ["SERVER_PORT"] = server_port
|