FROM pytorch/pytorch:2.8.0-cuda12.6-cudnn9-runtime ARG DEBIAN_FRONTEND=noninteractive ENV CUDA_HOME=/usr/local/cuda \ TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6+PTX" # RUN conda update conda -y RUN apt -y update && apt install tesseract-ocr -y RUN apt-get -y update && apt-get install libgl1 poppler-utils -y --no-install-recommends # Set the working directory for all the subsequent Dockerfile instructions. WORKDIR /app RUN mkdir weights ; cd weights ; wget -q https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth ; cd .. COPY app.py /app/ COPY pdf_converter.py /app/ COPY uv.lock /app/ COPY setup.py /app/ ADD groundingdino/ /app/groundingdino/ COPY pyproject.toml /app/ # RUN cd GroundingDINO/ && python -m pip install . RUN pip install --no-cache-dir uv && uv sync --no-cache RUN /app/.venv/bin/python -m pip install -e . CMD [ "/app/.venv/bin/python", "app.py" ]