Commit ·
fdadce4
1
Parent(s): d4811ce
fix(entrypoint): always bind uvicorn to 7860 (HF Spaces proxy port)
Browse filesThe PORT secret is 8000, so uvicorn bound 8000 and the platform never
saw the app come up -> stuck APP_STARTING. Spaces always route to 7860.
Co-Authored-By: Claude Code <noreply@anthropic.com>
- entrypoint.py +4 -1
entrypoint.py
CHANGED
|
@@ -169,7 +169,10 @@ def main():
|
|
| 169 |
if not broker_url:
|
| 170 |
print("[ENTRYPOINT] WARNING: no Redis reachable - bulk jobs use the synchronous fallback", flush=True)
|
| 171 |
|
| 172 |
-
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
def spawn(kind):
|
| 175 |
if kind == "worker":
|
|
|
|
| 169 |
if not broker_url:
|
| 170 |
print("[ENTRYPOINT] WARNING: no Redis reachable - bulk jobs use the synchronous fallback", flush=True)
|
| 171 |
|
| 172 |
+
# Hugging Face Spaces always proxies to container port 7860; a PORT
|
| 173 |
+
# env/secret with another value (e.g. 8000) must not steer uvicorn,
|
| 174 |
+
# or the platform never sees the app start.
|
| 175 |
+
port = "7860"
|
| 176 |
|
| 177 |
def spawn(kind):
|
| 178 |
if kind == "worker":
|