RapidOCR / Dockerfile
KroZenDev's picture
Update Dockerfile
7257851 verified
Raw
History Blame Contribute Delete
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"]