sahilfarib's picture
Upload Dockerfile with huggingface_hub
b902604 verified
Raw
History Blame Contribute Delete
770 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies for OCR and PDF processing
RUN apt-get update && apt-get install -y \
tesseract-ocr \
poppler-utils \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source code
COPY . .
# Create storage directory
RUN mkdir -p storage
# Expose ports for FastAPI and Streamlit
EXPOSE 7860
# Run both services (using a simple shell command for the all-in-one container demo)
CMD ["sh", "-c", "uvicorn api.main:app --host 0.0.0.0 --port 8000 & streamlit run ui/app.py --server.port 7860 --server.address 0.0.0.0 --server.enableCORS false --server.enableXsrfProtection false"]