Amitgm commited on
Commit
9b78fb0
·
verified ·
1 Parent(s): e1569d8

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -0
Dockerfile ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ # Set the working directory
4
+ WORKDIR /code
5
+
6
+ # Add requirements file to the Docker image
7
+ COPY ./requirements.txt /code/requirements.txt
8
+
9
+ # Install Python libraries
10
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
+
12
+ # Add the app folder into the Docker image
13
+ COPY ./app/ /code/app/
14
+ # COPY ./app/.streamlit /code/app/.streamlit
15
+
16
+ WORKDIR /code/app
17
+
18
+ # Set environment variable for Flask
19
+ # ENV FLASK_APP=app/main.py
20
+ # ENV FLASK_RUN_PORT=80
21
+
22
+ # Specify default command to run the Flask app
23
+ # CMD ["flask", "run", "--host=0.0.0.0", "--port=80"]
24
+
25
+ # Set the environment variable for Streamlit to find the config file
26
+ # ENV STREAMLIT_CONFIG=/code/app/.streamlit/config.toml
27
+
28
+ ENV STREAMLIT_APP=app/main.py
29
+
30
+
31
+ # Run the Streamlit app
32
+ CMD ["streamlit", "run", "main.py", "--server.port=80", "--server.address=0.0.0.0"]
33
+
34
+ # CMD ["gunicorn", "--bind", "0.0.0.0:80", "app.main:app"]