Uzaiir commited on
Commit
2e41a91
·
verified ·
1 Parent(s): 2b0dfe2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -28
Dockerfile CHANGED
@@ -1,44 +1,48 @@
1
- # # Use official Python base image
2
- # FROM python:3.10-slim
3
 
4
- # # Set workdir to /src
5
- # WORKDIR /src
6
 
7
- # # Copy requirements and install dependencies
8
- # COPY requirements.txt /src/
9
- # RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # # Copy entire src directory contents into container
12
- # COPY src/ /src/
 
13
 
14
- # # Expose streamlit port
15
- # EXPOSE 8501
16
 
17
- # # Command to run your app (adjust if file named differently)
18
- # CMD ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
19
 
 
 
20
 
21
- # Use an official Python image
22
- FROM python:3.10
23
 
24
- # Set the working directory
25
- WORKDIR /app
26
 
27
- # Copy all files to the container
28
- COPY . /app
29
 
30
- # Install dependencies
31
- RUN pip install --no-cache-dir -r requirements.txt
32
 
33
- # Create the .streamlit config directory and copy config.toml
34
- RUN mkdir -p /root/.streamlit
35
- COPY .streamlit/config.toml /root/.streamlit/config.toml
36
 
37
- # Expose port 8501 for Streamlit
38
- EXPOSE 8501
 
 
 
 
39
 
40
- # Run the Streamlit app from the src folder
41
- CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]
42
 
43
 
44
 
 
1
+ # Use official Python base image
2
+ FROM python:3.10-slim
3
 
4
+ # Set workdir to /src
5
+ WORKDIR /src
6
 
7
+ # Copy requirements and install dependencies
8
+ COPY requirements.txt /src/
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ # Create the .streamlit config directory and copy config.toml
12
+ RUN mkdir -p /root/.streamlit
13
+ COPY .streamlit/config.toml /root/.streamlit/config.toml
14
 
15
+ # Copy entire src directory contents into container
16
+ COPY src/ /src/
17
 
18
+ # Expose streamlit port
19
+ EXPOSE 8501
20
 
21
+ # Command to run your app
22
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
23
 
 
 
24
 
25
+ # # Use an official Python image
26
+ # FROM python:3.10
27
 
28
+ # # Set the working directory
29
+ # WORKDIR /app
30
 
31
+ # # Copy all files to the container
32
+ # COPY . /app
33
 
34
+ # # Install dependencies
35
+ # RUN pip install --no-cache-dir -r requirements.txt
 
36
 
37
+ # # Create the .streamlit config directory and copy config.toml
38
+ # RUN mkdir -p /root/.streamlit
39
+ # COPY .streamlit/config.toml /root/.streamlit/config.toml
40
+
41
+ # # Expose port 8501 for Streamlit
42
+ # EXPOSE 8501
43
 
44
+ # # Run the Streamlit app from the src folder
45
+ # CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]
46
 
47
 
48