CoolFace
Apppublic

redhairedshanks1/Extract-Text-and-Table

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile42 linesDownload Raw Back to root
1FROM python:3.10-slim2 3# Set environment variables4ENV PYTHONDONTWRITEBYTECODE=15ENV PYTHONUNBUFFERED=16ENV HOME=/app 7ENV PADDLEOCR_HOME=/app/.paddleocr8 9WORKDIR /app10 11# Create writable OCR model directory and non-root user12RUN mkdir -p /app/.paddleocr && \13    adduser --disabled-password --gecos '' appuser && \14    chown -R appuser:appuser /app15 16# Install system dependencies (updated for Trixie)17RUN apt-get update && apt-get install -y --no-install-recommends \18    libgl1 \19    libglib2.0-0 \20    libsm6 \21    libxext6 \22    libxrender-dev \23    libgomp1 \24    poppler-utils \25    && apt-get clean && rm -rf /var/lib/apt/lists/*26 27# Install Python dependencies28COPY requirements.txt .29RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt30 31# Copy project files32COPY . .33 34# Switch to non-root user35USER appuser36 37# Expose FastAPI port38EXPOSE 786039 40# Start the app41CMD ["python", "app.py"]42