We recommend using conda
for package management. These instructions should allow you to install and run mava.
- Create and activate a virtual environment
conda create -n mava python=3.12
conda activate mava
- Clone mava
git clone https://github.com/instadeepai/Mava.git
cd mava
- Install the dependencies
pip install -e .
- Install jax on your accelerator. The example below is for an NVIDIA GPU, please the official install guide for other accelerators
pip install "jax[cuda12]==0.4.30"
- Run a system!
python mava/systems/ppo/ff_ippo.py env=rware
If you are having trouble with dependencies we recommend using our docker image and provided Makefile.
-
Build the docker image using the
make
command:To build the docker image run
make build
-
Run a system:
make run example=dir/to/system.py
For example,
make run example=mava/systems/ppo/ff_ippo.py
.Alternatively, run bash inside a docker container with mava installed by running
make bash
, and from there systems can be run as follows:python dir/to/system.py
.