AstraOS commited on
Commit
5501213
·
verified ·
1 Parent(s): 53ca1dd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -3
Dockerfile CHANGED
@@ -15,9 +15,15 @@ COPY --chown=user ./requirements.txt requirements.txt
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
  RUN pip install --no-cache-dir Flask
17
 
18
- EXPOSE 5000
 
 
 
19
 
 
 
20
 
21
  COPY --chown=user . /app
22
- # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
23
- CMD ["python", "app.py"]
 
 
15
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
16
  RUN pip install --no-cache-dir Flask
17
 
18
+ # Set environment variables for Flask
19
+ ENV FLASK_APP=app.py
20
+ ENV FLASK_RUN_HOST=0.0.0.0
21
+ ENV FLASK_RUN_PORT=7860 # Hugging Face Spaces use port 7860 by default
22
 
23
+ # Expose the correct port
24
+ EXPOSE 7860
25
 
26
  COPY --chown=user . /app
27
+
28
+ # Run the Flask app
29
+ CMD ["flask", "run"]