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

You can also assign extra options during the installation, currently available extras are gymnasium, neuroevolution, envpool, distributed, and full. For example, to install EvoX with all features, run the following command:

pip install evox[full]

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:

  1. Using WSL 2 (Windows Subsystem for Linux) and install PyTorch on the Linux side.

  2. Directly install PyTorch on Windows.

We also 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.com etc.).

  • If the script is failed due to network failure, close and reopen it to continue the installation.

Windows WSL 2 (optional)#

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.

See also

NVIDIA has a detailed CUDA on WSL User Guide

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())