Spaces:
Sleeping
Sleeping
File size: 773 Bytes
b106f38 | 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 lightweight Python 3.12 runtime
FROM python:3.12-slim
# Prevent Python from writing .pyc files and enable unbuffered logging
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PORT=7860
# Install minimal OS dependencies for PDF processing and math libraries
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application source code
COPY . .
# Ensure storage directories exist
RUN mkdir -p data/uploads data/processed data/vectorstore
# Expose Hugging Face Space port
EXPOSE 7860
# Run Gradio application
CMD ["python", "app.py"]
|