HuuHuy227
new-modified
45a80c1
raw
history blame contribute delete
781 Bytes
# Use Python 3.9 slim image
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies for cairosvg
RUN apt-get update && apt-get install -y \
graphviz \
build-essential \
python3-dev \
python3-pip \
python3-setuptools \
pkg-config \
libpango1.0-dev \
shared-mime-info \
mime-support \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Install Python packages
RUN pip install --no-cache-dir -r requirements.txt
# Download spaCy language model
RUN python -m spacy download en_core_web_md
# Copy application files
COPY . /app
# Set the Streamlit entrypoint
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]