| FROM nvidia/cuda:10.1-cudnn7-devel |
|
|
| ENV DEBIAN_FRONTEND noninteractive |
| RUN apt-get update && apt-get install -y \ |
| python3-opencv ca-certificates python3-dev git wget sudo \ |
| cmake ninja-build protobuf-compiler libprotobuf-dev && \ |
| rm -rf /var/lib/apt/lists/* |
| RUN ln -sv /usr/bin/python3 /usr/bin/python |
|
|
| |
| ARG USER_ID=1000 |
| RUN useradd -m --no-log-init --system --uid ${USER_ID} appuser -g sudo |
| RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers |
| USER appuser |
| WORKDIR /home/appuser |
|
|
| ENV PATH="/home/appuser/.local/bin:${PATH}" |
| RUN wget https://bootstrap.pypa.io/get-pip.py && \ |
| python3 get-pip.py --user && \ |
| rm get-pip.py |
|
|
| |
| |
| RUN pip install --user tensorboard cython |
| RUN pip install --user torch==1.5+cu101 torchvision==0.6+cu101 -f https://download.pytorch.org/whl/torch_stable.html |
| RUN pip install --user 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI' |
|
|
| RUN pip install --user 'git+https://github.com/facebookresearch/fvcore' |
| |
| RUN git clone https://github.com/facebookresearch/detectron2 detectron2_repo |
| |
| ENV FORCE_CUDA="1" |
| |
| |
| ARG TORCH_CUDA_ARCH_LIST="Kepler;Kepler+Tesla;Maxwell;Maxwell+Tegra;Pascal;Volta;Turing" |
| ENV TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST}" |
|
|
| RUN pip install --user -e detectron2_repo |
|
|
| |
| ENV FVCORE_CACHE="/tmp" |
| WORKDIR /home/appuser/detectron2_repo |
|
|
| |
| |
| |
| |
| |
| |
|
|