Building right now may be a bit rough, we are improving and finding ways to simplifying the build process.
- (if you want version with tensorflow) Install
tensorflow_ccby following steps described here. - (if you want cuDNN version) Install CUDA and cuDNN.
- Install ninja build (
ninja-build), meson, and (optionally) gtest (libgtest-dev). - Go to lc0/
- Run ./build.sh
lc0will be inlc0/build/release/directory
If you want to build with a different compiler, pass the CC and CXX environment variables:
CC=clang-6.0 CXX=clang++-6.0 ./build.sh
For Ubuntu 16.04 you need the latest version of meson and clang-6.0 before performing the steps above:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install clang-6.0 ninja-build
pip3 install meson --user
CC=clang-6.0 CXX=clang++-6.0 INSTALL_PREFIX=~/.local ./build.sh
Make sure that ~/.local/bin is in your PATH environment variable. You can now type lc0 --help and start.
- Install Microsoft Visual Studio
- Install CUDA (v9.2 is fine)
- Install cuDNN.
- Install Python3
- Install Meson:
pip3 install --upgrade meson - Edit
build-cuda.cmd:
- If you use MSVS other than 2015 (or if it's installed into non-standard location):
C:\Program Files (x86)\Microsoft Visual Studio 14.0\replace 14.0 with your version--backend 2015replace 2015 with your version
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\lib\x64replace with your CUDA pathC:\dev\cuDNN\replace with your cuDNN directory
- Run
build-cuda.cmd. It will generate MSVS project and pause.
Then either:
- Hit to build it.
- Resulting binary will be
build/lc0.exe
Or.
- Open generated solution
build/lc0.slnin Visual Studio and build yourself.
- Install brew as per the instructions at https://brew.sh/
- Install python3:
brew install python3 - Install meson:
brew install meson - Install ninja:
brew install ninja - Run
./build.sh - The resulting binary will be in build/release