Somuai12 commited on
Commit
04f9dda
·
1 Parent(s): 08334b9

fix: Align Container Port to 7860 for Hugging Face Space stability

Browse files
Files changed (2) hide show
  1. Dockerfile +3 -3
  2. server/app.py +1 -1
Dockerfile CHANGED
@@ -10,11 +10,11 @@ RUN pip install --no-cache-dir -r requirements.txt
10
  COPY . .
11
 
12
  # Expose port
13
- EXPOSE 8000
14
 
15
  # Liveness probe — validator checks this
16
  HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
17
- CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"
18
 
19
  # Start server
20
- CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]
 
10
  COPY . .
11
 
12
  # Expose port
13
+ EXPOSE 7860
14
 
15
  # Liveness probe — validator checks this
16
  HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
17
+ CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/health')"
18
 
19
  # Start server
20
+ CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "7860"]
server/app.py CHANGED
@@ -228,7 +228,7 @@ if os.getenv("ENABLE_WEB_INTERFACE", "false").lower() == "true":
228
  app = gr.mount_gradio_app(app, custom_demo, path="/dashboard/")
229
 
230
  def main():
231
- uvicorn.run("server.app:app", host="0.0.0.0", port=8000, reload=False)
232
 
233
  if __name__ == "__main__":
234
  main()
 
228
  app = gr.mount_gradio_app(app, custom_demo, path="/dashboard/")
229
 
230
  def main():
231
+ uvicorn.run("server.app:app", host="0.0.0.0", port=7860, reload=False)
232
 
233
  if __name__ == "__main__":
234
  main()