File size: 692 Bytes
b4cdbd5
ae34495
9c7192b
85fd14e
9c7192b
 
b4cdbd5
85fd14e
b4cdbd5
0a74d13
85fd14e
9c7192b
b4cdbd5
b8611e0
9c7192b
b4cdbd5
 
85fd14e
0a74d13
85fd14e
 
b4cdbd5
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use a slim Python base image for efficiency
FROM python:3.10-slim-buster

# Set the working directory inside the container
WORKDIR /app

# Copy the requirements.txt file first to leverage Docker's build cache.
COPY requirements.txt .

# Install Python dependencies (including gunicorn, Flask, Streamlit, etc.)
RUN pip install --no-cache-dir -r requirements.txt

# Copy the entire project directory into the container's /app directory.
COPY . .

# Grant execution permissions to the start.sh script
RUN chmod +x start.sh

# Expose the port Streamlit will listen on directly (7860 for Hugging Face Spaces)
EXPOSE 7860

# Define the command to run when the container starts.
CMD ["./start.sh"]