I normally use Anaconda3 on Ubuntu 16.04 to manage my environments including Cuda & CUDNN. Create a new file called dev_environment.yml at the root directory of pyyolo. The dev_environment.yml should look like the following:
Set the flags GPU=1 and CUDNN=1 at the top of the Makefile.
Change the location of where cuda can be found. In the Makefile line 40, replace the line:
COMMON+= -DGPU -I/usr/local/cuda/include/
with
COMMON+= -DGPU -I/home/USER/anaconda3/envs/ENV-NAME/include/
Add an option to prevent the error: /usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope. In the Makefile line 66, replace the line:
$(NVCC) $(ARCH) $(COMMON) --compiler-options "$(CFLAGS)" -c $< -o $@
with
$(NVCC) -D_FORCE_INLINES $(ARCH) $(COMMON) --compiler-options "$(CFLAGS)" -c $< -o $@
Installing pyyolo
You don't need sudo anymore since we will be using a locally available Anaconda python.
1. git clone --recursive https://github.com/thomaspark-pkj/pyyolo.git
2. Setup Environment (Described above)
3. Changes to Makefile (Described above)
4. make clean
5. make
6. python setup_gpu.py build
7. python setup_gpu.py install
Environment Setup
I normally use Anaconda3 on Ubuntu 16.04 to manage my environments including Cuda & CUDNN. Create a new file called
dev_environment.yml
at the root directory of pyyolo. Thedev_environment.yml
should look like the following:Install and activate the environment:
Changes to Makefile
Set the flags
GPU=1
andCUDNN=1
at the top of the Makefile.Change the location of where cuda can be found. In the Makefile line 40, replace the line:
COMMON+= -DGPU -I/usr/local/cuda/include/
withCOMMON+= -DGPU -I/home/USER/anaconda3/envs/ENV-NAME/include/
Add an option to prevent the error:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
. In the Makefile line 66, replace the line:$(NVCC) $(ARCH) $(COMMON) --compiler-options "$(CFLAGS)" -c $< -o $@
with$(NVCC) -D_FORCE_INLINES $(ARCH) $(COMMON) --compiler-options "$(CFLAGS)" -c $< -o $@
Installing pyyolo
You don't need sudo anymore since we will be using a locally available Anaconda python.
Run Example