Spaces:
Sleeping
Sleeping
Sibam commited on
Commit ·
fe3f40d
1
Parent(s): 7b56838
fix: change port to 7860 for HF Spaces compatibility
Browse files- Dockerfile +2 -2
- openenv.yaml +1 -1
Dockerfile
CHANGED
|
@@ -34,7 +34,7 @@ ENV MAX_CONCURRENT_ENVS=64
|
|
| 34 |
|
| 35 |
# Health check
|
| 36 |
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
| 37 |
-
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:
|
| 38 |
|
| 39 |
# Start server
|
| 40 |
-
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "
|
|
|
|
| 34 |
|
| 35 |
# Health check
|
| 36 |
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
| 37 |
+
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')" || exit 1
|
| 38 |
|
| 39 |
# Start server
|
| 40 |
+
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
|
openenv.yaml
CHANGED
|
@@ -3,4 +3,4 @@ name: preference_lab
|
|
| 3 |
type: space
|
| 4 |
runtime: fastapi
|
| 5 |
app: server.app:app
|
| 6 |
-
port:
|
|
|
|
| 3 |
type: space
|
| 4 |
runtime: fastapi
|
| 5 |
app: server.app:app
|
| 6 |
+
port: 7860
|