Files
grounding-dino/Dockerfile

29 lines
938 B
Docker
Raw Normal View History

2025-08-18 08:06:51 +00:00
FROM pytorch/pytorch:2.8.0-cuda12.6-cudnn9-runtime
ARG DEBIAN_FRONTEND=noninteractive
ENV CUDA_HOME=/usr/local/cuda \
2025-08-18 08:06:51 +00:00
TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6+PTX"
2025-08-18 08:06:51 +00:00
# RUN conda update conda -y
2025-08-18 08:06:51 +00:00
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.
2025-08-18 08:06:51 +00:00
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 ..
2025-08-18 08:06:51 +00:00
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/
2025-08-18 08:06:51 +00:00
# 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 .
2025-08-18 08:06:51 +00:00
CMD [ "/app/.venv/bin/python", "app.py" ]