rasmodev commited on
Commit
51bc833
·
verified ·
1 Parent(s): dbc8e08

Rename Dockerfile.txt to Dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +20 -0
  2. Dockerfile.txt +0 -17
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python image from the Docker Hub
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory within the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements.txt file into the container
8
+ COPY ./requirements.txt /app/requirements.txt
9
+
10
+ # Install the Python dependencies
11
+ RUN pip install -r /app/requirements.txt
12
+
13
+ # Copy your Streamlit application code into the container
14
+ COPY ./app.py /app/app.py
15
+
16
+ # Expose port 7860 for the Streamlit application
17
+ EXPOSE 7860
18
+
19
+ # Command to start the Streamlit app
20
+ CMD ["streamlit", "run", "--server.port", "7860", "app.py"]
Dockerfile.txt DELETED
@@ -1,17 +0,0 @@
1
- # Use the official Python image from the Docker Hub
2
- FROM python:3.9-slim
3
-
4
- # Set the working directory in the container
5
- WORKDIR /app
6
-
7
- # Copy the current directory contents into the container at /app
8
- COPY . /app
9
-
10
- # Install any needed packages specified in requirements.txt
11
- RUN pip install --no-cache-dir -r requirements.txt
12
-
13
- # Expose port 8501 for the Streamlit app
14
- EXPOSE 8501
15
-
16
- # Command to run the Streamlit app
17
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]