Skip to content

Commit 883ceba

Browse files
committed
Updated INstallation instructions.
1 parent aca381e commit 883ceba

File tree

1 file changed

+42
-10
lines changed

1 file changed

+42
-10
lines changed

README.md

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,52 @@ This library is developed as part of the [Human Brain Project](https://www.human
2222

2323
## 📥 Installation
2424

25-
AngoraPy is available on PyPI.
25+
### Prerequisites
26+
AngoraPy requires Python 3.6 or higher. It is recommended to use a virtual environment to install AngoraPy and its dependencies. Additionally, some prerequisites are required.
2627

27-
```bash
28-
pip install angorapy
29-
```
28+
On Ubuntu, these can be installed by running
3029

31-
### From source
32-
Alternatively, you can download this repository or the source code of any previous release or branch and install from source, using pip.
30+
sudo apt-get install swig
3331

34-
```bash
35-
pip install -e .
36-
```
32+
Additionally, to run AngoraPy with its native distribution, you need MPI installed. On Ubuntu, this can be done by running
33+
34+
sudo apt-get install libopenmpi-dev
35+
36+
However, any other MPI implementation should work as well.
37+
38+
### Installing AngoraPy
39+
40+
#### Binaries
41+
AngoraPy is available as a binary package on PyPI. To install it, run
42+
43+
pip install angorapy
44+
45+
in your terminal.
46+
47+
If you would like to install a specific version, you can specify it by appending `==<version>` to the command above. For example, to install version 0.9.0, run
48+
49+
pip install angorapy==0.9.0
50+
51+
#### Source Installation
52+
To install AngoraPy from source, clone the repository and run `pip install -e .` in the root directory.
53+
54+
### Post-Installation
55+
56+
#### MuJoCo
57+
Gym installs both MuJoCo's new native Python bindings and the old mujoco-py bindings. You will not need the latter for AngoraPy, so you may uninstall it by running
58+
59+
pip uninstall mujoco-py
60+
61+
#### Test Your Installation
62+
You can test your installation by running the following command in your terminal:
63+
64+
python -m angorapy.train CartPole-v1
65+
66+
To test your MPI installation, run
67+
68+
mpirun -np <numthreads> --use-hwthread-cpus python -m angorapy.train LunarLanderContinuous-v2
3769

38-
This way, if you make changes to the source code, these will be recognized in the installation (without the need to reinstall).
70+
where `<numthreads>` is the number of threads you want to (and can) use.
3971

4072
### Docker
4173
Alternatively, you can install AngoraPy and all its dependencies in a docker container using the Dockerfile provided in this repository (/docker/Dockerfile). To this end, download the repository and build the docker image from the /docker directory:

0 commit comments

Comments
 (0)