Skip to content

Instantly share code, notes, and snippets.

@guschmue
Last active February 8, 2017 22:12
Show Gist options
  • Save guschmue/a6b59553d9b76769909877c37a501767 to your computer and use it in GitHub Desktop.
Save guschmue/a6b59553d9b76769909877c37a501767 to your computer and use it in GitHub Desktop.
# install the nvidia cuda8.0 toolkit from here: https://developer.nvidia.com/cuda-toolkit
# install the cudnn 5.1 from here: https://developer.nvidia.com/cudnn
# install cmake 3.6 from here: https://cmake.org/files/v3.6/cmake-3.6.3.zip
# install swig 3.0.10
# install anconda3
# install visual studio >= 2015.update3
#
set PreferredToolArchitecture=x64
set rel=RelWithDebInfo
set cmake_dir=%cd%\tensorflow\contrib\cmake
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
set CUDNN_HOME="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\cuda"
set PY=C:\local\Anaconda3
mkdir cmake_build
cd cmake_build
cmake %cmake_dir% -A x64 -DCMAKE_BUILD_TYPE=%rel% -DPYTHON_EXECUTABLE=%PY%\python.exe -DPYTHON_LIBRARIES=%PY%\libs\python35.lib -DSWIG_EXECUTABLE=d:\local\swigwin-3.0.10\swig.exe -Dtensorflow_BUILD_PYTHON_TESTS=ON -Dtensorflow_ENABLE_GPU=ON -DCUDNN_HOME=%CUDNN_HOME% -Dtensorflow_ENABLE_HDFS_SUPPORT=ON %1
MSBuild /p:Configuration=%rel% tf_python_build_pip_package.vcxproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment