Skip to content

Latest commit

 

History

History
67 lines (50 loc) · 1.67 KB

File metadata and controls

67 lines (50 loc) · 1.67 KB

Detailed installation guide

uv virtual environment

We recommend using uv for package management. These instructions should allow you to install and run mava.

  1. Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone mava
git clone https://github.com/instadeepai/Mava.git
cd mava
  1. Create a virtual environment and install requirements (this only installs a CPU version of JAX)
uv sync -p=3.12

3.1 If you want to install Mava so that it runs on your accelerator simply run the following:

uv sync --extra cuda12  # GPU aware JAX
uv sync --extra tpu  # TPU aware JAX
...
**Note:** If this does not work, please see the [official JAX install guide](https://github.com/google/jax#installation).

4. Run a system!
```bash
uv run mava/systems/ppo/anakin/ff_ippo.py env=rware

or

source .venv/bin/activate
python mava/systems/ppo/anakin/ff_ippo.py env=rware
  1. (Optional) Alternate package manager

If you prefer installation can also be done using pip:

pip install -e ".[cuda12]"  # GPU aware JAX
pip install -e ".[tpu]"  # TPU aware JAX

Docker

If you are having trouble with dependencies we recommend using our docker image and provided Makefile.

  1. Build the docker image using the make command:

    To build the docker image run

    make build
  2. 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.