- Assume NVIDIA Driver and CUDA Properly Installed, to Validate:
nvidia-smi
nvcc --version
- Install Global Dependencies
yum install -y \
protobuf-devel \
leveldb-devel \
snappy-devel \
opencv-devel \
boost-devel \
hdf5-devel \
gflags-devel \
glog-devel \
lmdb-devel \
cmake
tar -xzvf cudnn-7.0-linux-x64-v4.0-prod.tgz
cp cuda/lib64/* /usr/local/cuda/lib64/
cp cuda/include/cudnn.h /usr/local/cuda/include/
# NCCL version 1.3.4
git clone https://github.com/NVIDIA/nccl.git && cd nccl
make -j$(nproc) install && cd .. && rm -rf nccl
- Install Python Dependencies
pip install \
flask \
future \
graphviz \
hypothesis \
jupyter \
matplotlib \
pydot python-nvd3 \
pyyaml \
requests \
scikit-image \
scipy \
setuptools \
six \
tornado \
protobuf
git clone --recursive https://github.com/caffe2/caffe2.git
cd caffe2 && make -j$(nproc)
cd build && make -j$(nproc) install
- Set Environment Variables
echo $PYTHONPATH
# export PYTHONPATH=/usr/local:$PYTHONPATH
# export PYTHONPATH=$PYTHONPATH:/home/centos/caffe2/build
echo $LD_LIBRARY_PATH
# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"