|
1 | 1 | # Setup |
2 | 2 |
|
3 | | -#### Install PyTorch |
| 3 | +### Software prerequisites |
4 | 4 |
|
5 | | -[PyTorch installation guide](https://pytorch.org/get-started/locally/) |
| 5 | +#### Python |
6 | 6 |
|
7 | | -``` |
8 | | -python3 -m venv env |
9 | | -source env/bin/activate |
10 | | -pip install python-chess==0.31.4 pytorch-lightning==1.9.5 torch matplotlib tensorboard |
11 | | -``` |
| 7 | +If using easy_train.py then at least 3.7 is required. |
| 8 | + |
| 9 | +Otherwise versions around 3.6 should also work, but updating is recommended. |
| 10 | + |
| 11 | +Python 3.11 was also tested and works well. |
| 12 | + |
| 13 | +#### A C++ compiler |
| 14 | + |
| 15 | +If you're using easy_train.py then at least GCC 9.2 is required for compiling the data loader, Stockfish, and c-chess-cli. This a defensive version requirement as older versions were known to cause problems with Stockfish. |
| 16 | + |
| 17 | +If you're not using easy_train.py then no automatic compilation will take place; use what you wish. |
| 18 | + |
| 19 | +If you're on Windows the best way is to probably use [MSYS2](https://www.msys2.org/). It would also make it easy to install Make (next step). |
| 20 | + |
| 21 | +#### Make |
| 22 | + |
| 23 | +For compiling Stockfish and c-chess-cli. Not strictly necessary if you're not using easy_train.py, but recommended. |
| 24 | + |
| 25 | +#### CMake |
| 26 | + |
| 27 | +Necessary for compiling the data loader. |
| 28 | + |
| 29 | +https://cmake.org/install/ |
| 30 | + |
| 31 | +### Package dependencies |
12 | 32 |
|
13 | | -#### Install CuPy |
14 | | -First check what version of cuda is being used by pytorch. |
15 | | -``` |
16 | | -import torch |
17 | | -torch.version.cuda |
18 | | -``` |
19 | | -Then install CuPy with the matching CUDA version. |
20 | 33 | ``` |
21 | | -pip install cupy-cudaXXX |
| 34 | +python -m venv trainer |
| 35 | +pip install -r requirements.txt |
22 | 36 | ``` |
23 | | -where XXX corresponds to the first 3 digits of the CUDA version. For example `cupy-cuda112` for CUDA 11.2. |
24 | 37 |
|
25 | | -CuPy might use the PyTorch's private installation of CUDA, but it is better to install the matching version of CUDA separately. [CUDA Downloads](https://developer.nvidia.com/cuda-downloads) |
| 38 | +PyTorch with CUDA 11.8 will be automatically installed, along with the matching CuPy version. |
| 39 | + |
| 40 | +### The data loader (if not using easy_train.py) |
26 | 41 |
|
27 | | -#### Build the fast DataLoader |
28 | 42 | This requires a C++17 compiler and cmake. |
29 | 43 |
|
30 | 44 | Windows: |
@@ -126,4 +140,4 @@ This script runs in a loop, and will monitor the directory for new checkpoints. |
126 | 140 | * syzygy - http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75506 |
127 | 141 | * https://github.com/DanielUranga/TensorFlowNNUE |
128 | 142 | * https://hxim.github.io/Stockfish-Evaluation-Guide/ |
129 | | -* dkappe - Suggesting ranger (https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer) |
| 143 | +* dkappe - Suggesting ranger (https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer) |
0 commit comments