File size: 837 Bytes
a333284
 
4377399
a333284
4377399
a333284
4377399
a333284
 
4377399
 
 
a333284
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4377399
 
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
# Build stage
FROM python:3.11 as builder

WORKDIR /build

COPY requirements.txt .

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

COPY . .

# Build your application, if needed
# RUN python build.py

# Final stage
FROM python:3.11-slim-buster

COPY --from=builder /build /app

WORKDIR /app

# Copy installed dependencies from the builder stage
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages

# Copy the Streamlit executable
COPY --from=builder /usr/local/bin/streamlit /usr/local/bin/streamlit

# Expose the desired port
EXPOSE 7860

# Set the appropriate command to run Streamlit
# CMD ["streamlit", "run", "app/main.py", "--server.enableCORS", "false", "--server.port", "7860"]
CMD ["streamlit", "run", "app/main.py", "--server.port", "7860"]