project / Dockerfile
venkataashok's picture
Create Dockerfile
f696c87 verified
raw
history blame contribute delete
578 Bytes
# Use official Python image
FROM python:3.10
# Set working directory
WORKDIR /app
# Copy project files
COPY . /app
# Install system dependencies required for OCR
RUN apt-get update && apt-get install -y \
poppler-utils \
tesseract-ocr \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip install --upgrade pip
# Install Python dependencies
RUN pip install -r requirements.txt
# Download spacy dependency
RUN python -m spacy download en_core_web_sm
# Expose port used by HuggingFace Spaces
EXPOSE 7860
# Run FastAPI app
CMD ["python", "app.py"]