- install webdriver.sh
brew tap vulgo/repo
brew install webdriver.sh- install lastest driver
webdriverinstalled version 387.10.10.10.40.133
- install cuda via brew:
brew tap homebrew/cask-drivers
brew cask install nvidia-cuda- add the following to your file ~/.bash_profile:
export PATH=/Developer/NVIDIA/CUDA-9.0/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-9.0/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}- verify installation
nvcc --versioninstalled version 418.105
Install cuDNN
- download cuDNN v7.6.5 (November 5th, 2019), for CUDA 10.1
- untar
tar -xzvf cudnn-10.1-osx-x64-v7.6.5.32.tgz - copy the files into the CUDA Toolkit directory, and change the file permissions
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp cuda/lib/libcudnn* /usr/local/cuda/lib
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*installed version 7.6.5
Build PyTorch from source
- install anaconda
- remove previous versions of pythorch
conda remove pytorch torchvision -y
pip uninstall torch -y
pip uninstall torch -y # yes twiceconda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requestsgit clone --recursive https://github.com/pytorch/pytorch
cd pytorchexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python setup.py installerror when linking
libtorch_cuda.dylibon macOS 10.13.6 fix
- build
torchvisionfrom source
git clone --recursive https://github.com/pytorch/vision
cd vision
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python setup.py install- verify installation
import torch
print(torch.__version__)import torch
assert torch.cuda.is_available()
assert torch.randn(20).cuda().is_cudaimport torch
assert torch.backends.cudnn.enabledinstalled version 1.7.0a0+eeb43ff
I simple removed the folder /Developer/NVIDIA/CUDA-7.5/bin/nvcc and the build proceeded until this error.