shahabkahn commited on
Commit
c8f2038
·
verified ·
1 Parent(s): a944431

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -43,12 +43,15 @@ ENV HF_HOME=/app/.cache/huggingface
43
  # Switch to the non-privileged user to run the application.
44
  USER appuser
45
 
46
- # Copy the rest of the source code into the container.
47
  COPY . .
48
 
49
  # Expose the ports that the application listens on.
50
  EXPOSE 7860
51
  EXPOSE 8501
52
 
53
- # Run the application.
54
- CMD ["bash", "-c", "uvicorn app:app --host 0.0.0.0 --port 7860 & streamlit run frontend.py --server.port 8501 --server.enableXsrfProtection false"]
 
 
 
 
43
  # Switch to the non-privileged user to run the application.
44
  USER appuser
45
 
46
+ # Copy the source code into the container.
47
  COPY . .
48
 
49
  # Expose the ports that the application listens on.
50
  EXPOSE 7860
51
  EXPOSE 8501
52
 
53
+ # Run the FastAPI application using uvicorn
54
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
55
+
56
+ # Start the Streamlit application separately
57
+ CMD ["streamlit", "run", "frontend.py", "--server.port", "8501", "--server.enableXsrfProtection", "false"]