forked from LeelaChessZero/lczero-training
-
Notifications
You must be signed in to change notification settings - Fork 0
Contribute Leela games with vast.ai
James Horsfall Thomas edited this page Sep 9, 2020
·
3 revisions
Vast.ai setup Guide
- Go to https://vast.ai/console/create/
- Sign up/Create an account, you will need a credit card
- Click "Create" on the sidebar
- Click "Select Image..." (or Edit Image) and select "vastai/tensorflow"
- Select "Run a jupyter-python notebook" (you can also make an ssh instance if you prefer but you need to figure out a bit more)
- In the On-start Script paste the following: see script below (the vast.ai text window is very short for me, but it works - be sure to change -user on the last line to your contribution name). you can also choose -run 2 or leave out the run if you wish.
- Click "Select"
- On the main page on the top click "interruptible" for best value, but your run may be interrupted and you will have to start a new instance.
- Find any GPU that fits your budget, things to look for are RTX 2070 or above or V100, PCIE 3.0, and DLPerf above 10 (expected deep learning performance) 9B. for simple use choose a machine with a single GPU - if you pick one with multiple GPUs you should probably ssh
- Click "Make Bid"
- In the Base Rental go a bit above the default price otherwise your instance might not be available/usable
- Click "Make Bid"
- Click "Instances" on the left sidebar and you should see your instance starting up.
- Click "Start" once it appears, and then "Connect" once that appears. Will take minute or two to complete start up.
- If things are working, after a few minutes, GPU usage should be 90% or higher
- If you want to see specifics on game contribution, click "Connect" and then click "onstart.log" and scroll to the bottom (it will take few minutes before games start appearing)
for ssh connect, set up same way except when you click the instance "Connect" button you get the command to put in command console and you then can SSH to the machine and have a normal command line.
Startup script (works currently 2020-09-08 - many thanks to borg for help):
apt-get install -y git ninja-build libprotobuf-dev protobuf-compiler python3-pip
git clone --recurse-submodules https://github.com/LeelaChessZero/lc0.git
cd lc0 && git checkout $(git tag --list | grep -v rc | tail -1)
pip3 install meson ninja
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y gcc-8 g++-8
rm -r build
CC=gcc-8 CXX=g++-8 ./build.sh
mv ./build/release/lc0 lc0
curl -s -L https://github.com/LeelaChessZero/lczero-client/releases/latest | egrep -o '/LeelaChessZero/lczero-client/releases/download/.*/lc0-training-client-linux' | head -n 1 | wget --base=https://github.com/ -i - -O lc0-training-client-linux && chmod +x lc0-training-client-linux
./lc0-training-client-linux -run 1 -backend-opts="cudnn-fp16(gpu=0)" -user your_id -password anything