Spaces:
Build error
Build error
Update Dockerfile
Browse files1123455667891011121314151617910111819202122232425262728293031323334353637383940411942FROM python:3.10FROM python:3.10-slim
# Prevent pip from caching downloaded packagesARG PIP_NO_CACHE_DIR=1
RUN apt-get update \ && apt-get install -y tesseract-ocr libgl1 \# Install system dependenciesRUN apt-get update && apt-get install -y \ tesseract-ocr \ libgl1 \ gcc \ g++ \ libglib2.0-0 \ libsm6 \ libxext6 \ libxrender-dev \ && rm -rf /var/lib/apt/lists/*
RUN pip install torch==2.1.1 -i https://download.pytorch.org/whl/cpuRUN pip install paddlepaddle==2.6.0 -i https://mirror.baidu.com/pypi/simpleRUN pip install transformers pytesseract gradio Pillow paddleocr==2.7.0.3# Install Python packagesRUN pip install --no-cache-dir numpyRUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpuRUN pip install --no-cache-dir paddlepaddle -i https://pypi.org/simpleRUN pip install --no-cache-dir opencv-python-headlessRUN pip install --no-cache-dir \ transformers \ pytesseract \ gradio \ Pillow \ paddleocr \ pydantic \ fastapi
# Create a non-root userRUN useradd -m -u 1000 userUSER userENV HOME=/home/userWORKDIR $HOME/app
# Copy application filesCOPY --chown=user . $HOME/app
# Run the applicationCMD ["python", "app.py"]CMD ["python", "app.py"]Dockerfile+30-7