diff --git a/README.md b/README.md index 540da30c..d0eb67c7 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,44 @@ # Setup -#### Install PyTorch +### Software prerequisites -[PyTorch installation guide](https://pytorch.org/get-started/locally/) +#### Python -``` -python3 -m venv env -source env/bin/activate -pip install python-chess==0.31.4 pytorch-lightning==1.9.5 torch matplotlib tensorboard -``` +If using easy_train.py then at least 3.7 is required. + +Otherwise versions around 3.6 should also work, but updating is recommended. + +Python 3.11 was also tested and works well. + +#### A C++ compiler + +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. + +If you're not using easy_train.py then no automatic compilation will take place; use what you wish. + +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). + +#### Make + +For compiling Stockfish and c-chess-cli. Not strictly necessary if you're not using easy_train.py, but recommended. + +#### CMake + +Necessary for compiling the data loader. + +https://cmake.org/install/ + +### Package dependencies -#### Install CuPy -First check what version of cuda is being used by pytorch. -``` -import torch -torch.version.cuda -``` -Then install CuPy with the matching CUDA version. ``` -pip install cupy-cudaXXX +python -m venv trainer +pip install -r requirements.txt ``` -where XXX corresponds to the first 3 digits of the CUDA version. For example `cupy-cuda112` for CUDA 11.2. -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) +PyTorch with CUDA 11.8 will be automatically installed, along with the matching CuPy version. + +### The data loader (if not using easy_train.py) -#### Build the fast DataLoader This requires a C++17 compiler and cmake. Windows: @@ -71,4 +85,4 @@ This script runs in a loop, and will monitor the directory for new checkpoints. * syzygy - http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75506 * https://github.com/DanielUranga/TensorFlowNNUE * https://hxim.github.io/Stockfish-Evaluation-Guide/ -* dkappe - Suggesting ranger (https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer) +* dkappe - Suggesting ranger (https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..d2a8d8b0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +psutil +asciimatics +GPUtil +python-chess==0.31.4 +matplotlib +--find-links https://download.pytorch.org/whl/torch_stable.html +torch==2.0.1+cu118 +pytorch-lightning==1.9.5 +tensorboard +cupy-cuda11x +numba \ No newline at end of file