File size: 892 Bytes
2e10b84
b58cde7
 
2e10b84
b58cde7
 
d9d31be
 
b58cde7
 
d9d31be
b58cde7
 
d9d31be
b58cde7
d9d31be
 
 
 
 
2e10b84
b58cde7
d9d31be
2e10b84
b58cde7
d9d31be
 
 
 
 
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
# Use official Python slim image
FROM python:3.9-slim

# Set working directory inside container
WORKDIR /app

# Install system dependencies (build essentials, git, curl, etc.)
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    git \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Copy only requirements.txt first for better caching
COPY requirements.txt ./

# Upgrade pip to latest to avoid some install issues
RUN pip install --upgrade pip

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

# Copy the rest of your app files after dependencies installed
COPY . .

# Expose the port (optional but good practice)
EXPOSE 7860

# Run Streamlit app on 0.0.0.0 to be accessible externally, port 7860
CMD ["streamlit", "run", "streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"]