File size: 1,201 Bytes
2e41a91
 
d96db27
2e41a91
 
d96db27
2e41a91
 
 
d96db27
2e41a91
 
 
d96db27
2e41a91
 
d96db27
2e41a91
 
d96db27
2e41a91
c11a592
d96db27
8f484d8
2e41a91
 
8f484d8
2e41a91
 
8f484d8
2e41a91
 
d96db27
2e41a91
 
d96db27
2e41a91
 
 
 
 
 
8f484d8
2e41a91
 
2b0dfe2
d96db27
8e67d76
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Use official Python base image
FROM python:3.10-slim

# Set workdir to /src
WORKDIR /src

# Copy requirements and install dependencies
COPY requirements.txt /src/
RUN pip install --no-cache-dir -r requirements.txt

# Create the .streamlit config directory and copy config.toml
RUN mkdir -p /root/.streamlit
COPY .streamlit/config.toml /root/.streamlit/config.toml

# Copy entire src directory contents into container
COPY src/ /src/

# Expose streamlit port
EXPOSE 8501

# Command to run your app 
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]


# # Use an official Python image
# FROM python:3.10

# # Set the working directory
# WORKDIR /app

# # Copy all files to the container
# COPY . /app

# # Install dependencies
# RUN pip install --no-cache-dir -r requirements.txt

# # Create the .streamlit config directory and copy config.toml
# RUN mkdir -p /root/.streamlit
# COPY .streamlit/config.toml /root/.streamlit/config.toml

# # Expose port 8501 for Streamlit
# EXPOSE 8501

# # Run the Streamlit app from the src folder
# CMD ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0"]