|
|
|
|
|
|
|
|
|
|
|
FROM detectron2:v0 |
|
|
|
USER appuser |
|
ENV HOME=/home/appuser |
|
WORKDIR $HOME |
|
|
|
|
|
ENV CMAKE_PREFIX_PATH=$HOME/.local/lib/python3.6/site-packages/torch/ |
|
|
|
RUN sudo apt-get update && sudo apt-get install libopencv-dev --yes |
|
|
|
|
|
RUN git clone --branch v0.11.1 https://github.com/pytorch/vision/ |
|
RUN mkdir vision/build && cd vision/build && \ |
|
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/.local -DCMAKE_BUILD_TYPE=Release -DWITH_CUDA=on -DTORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST && \ |
|
make -j && make install |
|
|
|
|
|
ENV CPATH=$HOME/.local/include \ |
|
LIBRARY_PATH=$HOME/.local/lib \ |
|
LD_LIBRARY_PATH=$HOME/.local/lib |
|
|
|
|
|
|
|
RUN cd detectron2_repo/tools/deploy && mkdir build && cd build && \ |
|
cmake -DTORCH_CUDA_ARCH_LIST=$TORCH_CUDA_ARCH_LIST .. && make |
|
|
|
|