Download Dockerfile from KroZenDev/RapidOCR: direct link, hf CLI and curl.
- Browser
- Download file 710 Bytes
-
https://huggingface.co/spaces/KroZenDev/RapidOCR/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/KroZenDev/RapidOCR/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/KroZenDev/RapidOCR/resolve/main/Dockerfile
710 Bytes
| FROM python:3.10-slim | |
| WORKDIR /code | |
| # Системные зависимости для OpenCV | |
| RUN apt-get update && apt-get install -y \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| libgomp1 \ | |
| libxcb1 \ | |
| libgl1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY ./requirements.txt /code/requirements.txt | |
| # Устанавливаем зависимости, заменяем opencv-python на headless | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir -r /code/requirements.txt && \ | |
| pip uninstall -y opencv-python && \ | |
| pip install --no-cache-dir opencv-python-headless | |
| COPY . . | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |