Spaces:
Sleeping
Sleeping
File size: 781 Bytes
ad57a01 d6d5bda ad57a01 45a80c1 ad57a01 7b9f840 |
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 |
# 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"]
|