CoolFace
Apppublic

BytecodeApps/docverse-api

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
0likes
Dockerfile37 linesDownload Raw Back to docker
1# Build image for DocVerse FastAPI Backend2FROM python:3.10-slim3 4# Set environment variables5ENV PYTHONDONTWRITEBYTECODE=16ENV PYTHONUNBUFFERED=17 8# Install system dependencies (For EasyOCR & SciSpacy)9RUN apt-get update && apt-get install -y \10    build-essential \11    libpq-dev \12    gcc \13    tesseract-ocr \14    libtesseract-dev \15    && rm -rf /var/lib/apt/lists/*16 17# Set working directory18WORKDIR /app19 20# Install Python dependencies21COPY requirements.txt /app/22RUN pip install --upgrade pip23RUN pip install --no-cache-dir -r requirements.txt24 25# Download SciSpacy models (Example: en_core_sci_sm for biomedical lit)26# RUN pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.5.1/en_core_sci_sm-0.5.1.tar.gz27 28# Copy application code29COPY ./app /app/app30COPY ./main.py /app/main.py31 32# Expose port33EXPOSE 800034 35# Start FastAPI application36CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]37