File size: 764 Bytes
be5acda
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use official Python base image
FROM python:3.10-slim

# Set working directory inside the container
WORKDIR /app

# Copy all files to container
COPY . /app

# Install system dependencies (for PDF and NLP tools)
RUN apt-get update && apt-get install -y \
    gcc \
    libffi-dev \
    libssl-dev \
    poppler-utils \
    && rm -rf /var/lib/apt/lists/*

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

# Download spaCy model (one-time)
RUN python -m spacy download en_core_web_trf

# Expose Streamlit default port
EXPOSE 7860

# Streamlit needs these environment vars to run on Hugging Face
ENV PORT=7860
ENV PYTHONUNBUFFERED=1

# Run your app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]