Skip to content

Instantly share code, notes, and snippets.

@ylashin
Last active August 11, 2024 16:17
Show Gist options
  • Save ylashin/2c031af33a690b69483b785cf940b85b to your computer and use it in GitHub Desktop.
Save ylashin/2c031af33a690b69483b785cf940b85b to your computer and use it in GitHub Desktop.
detectron2 Dockerfile
FROM python:3.8-slim-buster
RUN apt-get update -y
# gcc compiler and opencv prerequisites
RUN apt-get -y install nano git build-essential libglib2.0-0 libsm6 libxext6 libxrender-dev
# Detectron2 prerequisites
RUN pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install cython
RUN pip install -U 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
# Detectron2 - CPU copy
RUN python -m pip install detectron2 -f https://dl.fbaipublicfiles.com/detectron2/wheels/cpu/index.html
# Development packages
RUN pip install flask flask-cors requests opencv-python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment