EvoX Installation Guide
Install EvoX
EvoX is available at PyPI and can be installed via:
# install pytorch first
# for example:
pip install torch
# then install EvoX
pip install "evox[default]"
You can also assign extra options during the installation, currently available extras are vis, neuroevolution, test, docs, default. For example, to install EvoX with all features, run the following command:
pip install "evox[vis,neuroevolution]"
Install PyTorch with accelerator support
evox relies on torch to provide hardware acceleration.
The overall architecture of these Python packages looks like this:
stateDiagram-v2
torch : torch
nv_gpu : NVIDIA GPU
amd_gpu : AMD GPU
cpu : CPU
direction LR
evox --> torch
torch --> nv_gpu
torch --> amd_gpu
torch --> cpu
To summarize, whether evox has CPU support or Nvidia GPU support (CUDA) or AMD GPU support (ROCm) depends on the installed PyTorch version. Please refer to the PyTorch official website for more installation help: torch
Nvidia GPU support on Windows
EvoX support GPU acceleration through PyTorch. There are two ways to use PyTorch with GPU acceleration on Windows:
- Using WSL 2 (Windows Subsystem for Linux) and install PyTorch on the Linux side.
- Directly install PyTorch on Windows.
For option 2, we provide a one-click script for fast deployment on fresh installed windows 10/11 64bit with Nvidia GPUs. The script will not use WSL 2 and will install the native Pytorch version on Windows. It will automatically install related applications like VSCode, Git and MiniForge3.
- Ensure the Nvidia driver is properly installed first. Otherwise the script will fall back to cpu mode.
- When running the script, ensure a stable network (accessible to
github.cometc.). - If the script is failed due to network failure, close and reopen it to continue the installation.
Manual installation on Windows
If you prefer to install PyTorch directly on Windows manually, you can follow the steps below:
- Install Nvidia driver as mentioned above.
- Install Python 3.10 or above from python.org.
- Install PyTorch.
- (Optional) Install
triton-windowsfortorch.compilesupport on Windows. - Install EvoX.
Windows WSL 2
Download the latest NVIDIA Windows GPU Driver and install it. Then your WSL 2 will support Nvidia GPUs in its Linux environments.
Warning: Do NOT install any NVIDIA GPU Linux driver within WSL 2. Install the driver on the Windows side.
NVIDIA has a detailed [CUDA on WSL User Guide](https://docs.nvidia.com/cuda/wsl-user-guide/index.html)
AMD GPU (ROCm) support
We recommend using a Docker container from rocm/pytorch.
docker run -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --shm-size 8G -v $HOME/dockerx:/dockerx -w /dockerx rocm/pytorch:latest
Verify the installation
Open a Python terminal, and run the following:
from torch.utils.collect_env import get_pretty_env_info
import evox
print(get_pretty_env_info())