Arulkumar03/Wheat_HEAD_Detection_Counting_ComputerVision_Model
0
1# Copyright (c) Facebook, Inc. and its affiliates.2# This file defines a container that compiles the C++ examples of detectron2.3# See docker/README.md for usage.4 5# Depends on the image produced by "./Dockerfile"6FROM detectron2:v07 8USER appuser9ENV HOME=/home/appuser10WORKDIR $HOME11 12# Let torchvision find libtorch13ENV CMAKE_PREFIX_PATH=$HOME/.local/lib/python3.6/site-packages/torch/14 15RUN sudo apt-get update && sudo apt-get install libopencv-dev --yes16 17# install libtorchvision18RUN git clone --branch v0.11.1 https://github.com/pytorch/vision/19RUN mkdir vision/build && cd vision/build && \20 cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release -DWITH_CUDA=on -DTORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST && \21 make -j && make install22 23# make our installation take effect24ENV CPATH=$HOME/.local/include \25 LIBRARY_PATH=$HOME/.local/lib \26 LD_LIBRARY_PATH=$HOME/.local/lib27 28 29# build C++ examples of detectron230RUN cd detectron2_repo/tools/deploy && mkdir build && cd build && \31 cmake -DTORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST .. && make32# binaries will be available under tools/deploy/build33 