ahmedelbeshry commited on
Commit
8edbfa6
1 Parent(s): 65c1263

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -21
Dockerfile CHANGED
@@ -1,26 +1,11 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.11-slim
3
 
4
- # Set environment variables to avoid interactive prompts
5
- ENV DEBIAN_FRONTEND=noninteractive
6
 
7
- # Set the working directory in the container
8
- WORKDIR /app
9
 
10
- # Copy the current directory contents into the container at /app
11
- COPY . /app
12
 
13
- # Install any needed packages specified in requirements.txt
14
- RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy and set environment variables from .env file
17
- #COPY .env .env
18
-
19
- # Expose the port the Flask app runs on
20
- EXPOSE 8501
21
-
22
- # Expose the port the Streamlit app runs on
23
- EXPOSE 7860
24
-
25
- # Run the Flask app and Streamlit app using a single CMD
26
- CMD ["streamlit", "run", "app.py"]
 
1
+ FROM python:3.9
 
2
 
3
+ WORKDIR /code
 
4
 
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
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]