GithubHelp home page GithubHelp logo

Docker image about planercnn HOT 2 OPEN

mohammad-h-b avatar mohammad-h-b commented on July 26, 2024
Docker image

from planercnn.

Comments (2)

oOXpycTOo avatar oOXpycTOo commented on July 26, 2024 2

I've created Dockerfile and it seems to work properly on K80 instance. Here it's:

FROM tobycheese/cuda:9.0-cudnn7-devel-ubuntu18.04

RUN apt-get update && apt-get install -y software-properties-common

RUN add-apt-repository ppa:deadsnakes/ppa -y

RUN apt-get update && apt-get install -y --no-install-recommends \
	git \
	tmux \
	nano \
        apt-utils \
        python3.6 \
        python3.6-dev \
        python3-pip \
        python3-setuptools \
        g++-6 \
        libsm6 \
        libxrender1 \
        libxtst6 \
        && \
    rm -rf /var/lib/apt/lists/* && \
    apt-get update
    
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 10 && \
    update-alternatives --set g++ /usr/bin/g++-6
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 10 && \
    update-alternatives --set gcc /usr/bin/gcc-6

RUN git clone https://github.com/NVlabs/planercnn.git

RUN cd planercnn && pip3 install -r requirements.txt && pip3 install h5py torch==0.4.0 -f https://download.pytorch.org/whl/cu92/torch_stable.html

RUN gcc -v && cat /usr/local/cuda/version.txt

RUN ls /usr/local | grep cuda

RUN cd planercnn && \
    cd nms/src/cuda/ && \
    nvcc -c -o nms_kernel.cu.o nms_kernel.cu -I /usr/local/cuda/include -x cu -Xcompiler -fPIC -arch=sm_37
RUN export LD_LIBRARY_PATH="/usr/local/cuda/include:$LD_LIBRARY_PATH" && \
    cd planercnn/nms && \
    sed -i 's|extra_objects=extra_objects|extra_objects=extra_objects,\n    include_dirs=["/usr/local/cuda/include"]|' build.py && \
    python3 build.py
RUN cd planercnn/roialign/roi_align/src/cuda && \
    nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -I /usr/local/cuda/include -x cu -Xcompiler -fPIC -arch=sm_37
RUN cd planercnn/roialign/roi_align && \
    export LD_LIBRARY_PATH="/usr/local/cuda-9.2/include:$LD_LIBRARY_PATH" && \
    sed -i 's|extra_compile_args=extra_compile_args|extra_compile_args=extra_compile_args,\n    include_dirs=["/usr/local/cuda/include"]|' build.py && \
    python3 build.py

RUN pip3 install torch==0.4.1 -f https://download.pytorch.org/whl/cu92/torch_stable.html

However, when you're inside docker you'll have to rerun compilation and build of nms and roi_align as GPU is not visible to the while building docker.

So, just run:

cd planercnn
cd nms/src/cuda/
nvcc -c -o nms_kernel.cu.o nms_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
cd ../../
python build.py
cd ../


cd roialign/roi_align/src/cuda/
nvcc -c -o crop_and_resize_kernel.cu.o crop_and_resize_kernel.cu -x cu -Xcompiler -fPIC -arch=[arch]
cd ../../
python build.py
cd ../../

from planercnn.

GauravGajbhiye avatar GauravGajbhiye commented on July 26, 2024

Hi @oOXpycTOo, I am using dockerfile created by you for "planercnn" project. I am having a system with 4 GPU's with Cuda 11.4.
While creating the image, I got following error for instruction RUN apt-get update && apt-get install -y software-properties-common:

W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease' is not signed.
The command '/bin/sh -c apt-get update && apt-get install -y software-properties-common' returned a non-zero code: 100

I have tried a lot of experimentation but could not resolve it. Kindly help me to get out of it.
Thanks.

from planercnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.