Installation¶
System requirements¶
- Nvidia gpu (GTX 10x0 or later, earlier may work but not tested)
- OS: Linux (We prefer Ubuntu 16.04)
We provide the Dockerfile
and docker-compose.yml
for you to install the enviroment. First we need to install docker in host machine
Install Docker¶
Install Docker
Install Docker from Homepage
Install CUDA on Host Machine
Install docker-compose
Install Nvidia-docker
In order to passthrough GPU to docker we need to install Nvidia-docker
Create Docker image¶
Clone from github:
git clone git@github.com:anhlt/faster_rcnn.git
Use docker-compose to create a docker image
cd ~/workspace/faster_rcnn docker-compose up --build
Compile Cython module¶
There are 3 modules need to be compiled, nms
, roi_pooling
, utils
. We need to exec \bin\bash
on Docker image to build those modules
cd ~/workspace/faster_rcnn
docker-compose exec python /bin/bash
Compile
nms
cd /data/faster_rcnn/nms python setup.py build_ext --inplace rm -rf build
Compile
utils
cd /data/faster_rcnn/utils python setup.py build_ext --inplace
Compile
roi_pooling
cd /data/faster_rcnn/roi_pooling/src/cuda/ nvcc -c -o roi_pooling.cu.o roi_pooling_kernel.cu -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC -arch=sm_61 cd /data/faster_rcnn/roi_pooling python setup.py build_ext --inplace