Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guide to making it Anaconda3 compatible #28

Open
nitred opened this issue Feb 4, 2018 · 0 comments
Open

Guide to making it Anaconda3 compatible #28

nitred opened this issue Feb 4, 2018 · 0 comments

Comments

@nitred
Copy link

nitred commented Feb 4, 2018

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. The dev_environment.yml should look like the following:

name: ENV-NAME
channels:
  - defaults
dependencies:
- python=3.5
- cudatoolkit=8
- cudnn=5
- pip:
  - cython

Install and activate the environment:

conda env create --force -f dev_environment.yml
source activate env-name

Changes to Makefile

  1. Set the flags GPU=1 and CUDNN=1 at the top of the Makefile.

  2. 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/

  3. 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

Run Example

python example.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant