Guiziii commited on
Commit
a168787
1 Parent(s): a94ff72

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,6 +1,3 @@
1
- # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
-
4
  FROM python:3.9
5
 
6
  WORKDIR /code
@@ -8,8 +5,13 @@ WORKDIR /code
8
  COPY ./requirements.txt /code/requirements.txt
9
 
10
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
- RUN pip install fastapi uvicorn flask
12
 
13
  COPY . .
14
 
15
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
1
  FROM python:3.9
2
 
3
  WORKDIR /code
 
5
  COPY ./requirements.txt /code/requirements.txt
6
 
7
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
 
8
 
9
  COPY . .
10
 
11
+ # Set the environment variables for Flask
12
+ ENV FLASK_APP=app.main
13
+ ENV FLASK_RUN_HOST=0.0.0.0
14
+ ENV FLASK_RUN_PORT=7860
15
+
16
+ # Command to run the Flask application
17
+ CMD ["flask", "run"]