CHA0sTIG3R commited on
Commit
2641c91
·
1 Parent(s): 64cb96f

Update Dockerfile to copy requirements.txt and upgrade dependencies

Browse files
Files changed (1) hide show
  1. dockerfile +4 -4
dockerfile CHANGED
@@ -10,19 +10,19 @@ ENV FLASK_APP=app.py \
10
  WORKDIR /code
11
 
12
  # Copy the requirements file into the container at /app
13
- COPY requirements.txt .
14
 
15
  # Install any needed dependencies specified in requirements.txt
16
- RUN pip install -r requirements.txt
17
 
18
  # Expose the secret OPENAI_API_KEY environment variable at build time
19
  RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true
20
 
21
  # Copy the rest of the application code into the container at /app
22
- COPY . /code
23
 
24
  # Expose the port that Flask is running on
25
  EXPOSE 7860
26
 
27
  # Command to run the application when the container starts
28
- CMD ["flask", "run"]
 
10
  WORKDIR /code
11
 
12
  # Copy the requirements file into the container at /app
13
+ COPY ./requirements.txt /code/requirements.txt
14
 
15
  # Install any needed dependencies specified in requirements.txt
16
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
17
 
18
  # Expose the secret OPENAI_API_KEY environment variable at build time
19
  RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true
20
 
21
  # Copy the rest of the application code into the container at /app
22
+ COPY . .
23
 
24
  # Expose the port that Flask is running on
25
  EXPOSE 7860
26
 
27
  # Command to run the application when the container starts
28
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]