CoolFace
Apppublic

dead031/ai-worker

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
Dockerfile38 linesDownload Raw Back to root
1FROM python:3.10-slim2 3# Install system dependencies4RUN apt-get update && apt-get install -y \5    tesseract-ocr \6    tesseract-ocr-mar \7    tesseract-ocr-hin \8    poppler-utils \9    libgl1 \10    libglx-mesa0 \11    libglib2.0-0 \12    git \13    build-essential \14    && rm -rf /var/lib/apt/lists/*15 16WORKDIR /app17 18COPY requirements.txt .19 20# Install Torch for CPU first (to avoid dependency issues with detectron2)21RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu22 23# Install Detectron2 with CPU flags24RUN FORCE_CUDA=0 pip install --no-cache-dir 'git+https://github.com/facebookresearch/detectron2.git'25 26# Install the rest of the requirements27RUN pip install --no-cache-dir -r requirements.txt28 29COPY . .30 31# Hugging Face Spaces uses user 100032RUN useradd -m -u 1000 user33USER user34ENV HOME=/home/user \35    PATH=/home/user/.local/bin:$PATH36 37CMD ["python", "app.py"]38