Installation
Contents
Installation#
Requirements#
Mac OS X or Linux machine
Python >= 3.6 (recommended 3.8.0)
-
virtualenv is also an acceptable alternative, but we assume you have conda installed in our examples below
Install robomimic#
1. Create and activate conda environment
$ conda create -n robomimic_venv python=3.8.0
$ conda activate robomimic_venv
2. Install PyTorch
PyTorch reference
Option 1: Mac
# Can change pytorch, torchvision versions
# We don't install cudatoolkit since Mac does not have NVIDIA GPU
$ conda install pytorch==2.0.0 torchvision==0.15.1 -c pytorch
Option 2: Linux
# Can change pytorch, torchvision versions
$ conda install pytorch==2.0.0 torchvision==0.15.1 -c pytorch
3. Install robomimic
Option 1: Install from source (recommended)
$ cd <PATH_TO_YOUR_INSTALL_DIRECTORY>
$ git clone https://github.com/ARISE-Initiative/robomimic.git
$ cd robomimic
$ pip install -e .
Option 2: Install via pip
$ pip install robomimic
Warning! Additional dependencies might be required
This is all you need for using the suite of algorithms and utilities packaged with robomimic. However, to use our demonstration datasets, you may need additional dependencies. Please see the datasets page for more information on downloading datasets and reproducing experiments, and see the simulators section below.
Optional Installations#
Downloading datasets and reproducing experiments#
See the datasets page for more information on downloading datasets and reproducing experiments.
Install simulators#
If you would like to run robomimic examples and work with released datasets, please install the following simulators:
robosuite
Required for running most robomimic examples and released datasets. Compatible with robosuite v1.2+. Install via:
# From source (recommended)
$ cd <PATH_TO_INSTALL_DIR>
$ git clone https://github.com/ARISE-Initiative/robosuite.git
$ cd robosuite
$ pip install -r requirements.txt
OR
# Via pip
$ pip install robosuite
(Optional) to use our released datasets and reproduce our experiments, switch to our v1.4.1
branch (requires installing robosuite from source):
git checkout v1.4.1
Test your installation#
This assumes you have installed robomimic from source.
Run a quick debugging (dummy) training loop to make sure robomimic is installed correctly:
$ cd <PATH_TO_ROBOMIMIC_INSTALL_DIR>
$ python examples/train_bc_rnn.py --debug
Run a much more thorough test of several algorithms and scripts (Warning: this script may take several minutes to finish!):
$ cd <PATH_TO_ROBOMIMIC_INSTALL_DIR>/tests
$ bash test.sh
To run some easy examples, see the Getting Started section.
Install documentation dependencies#
If you plan to contribute to the repository and add new features, you must install the additional requirements required to build the documentation locally:
$ pip install -r requirements-docs.txt
You can test generating the documentation and viewing it locally in a web browser:
$ cd <PATH_TO_ROBOMIMIC_INSTALL_DIR>/docs
$ make clean
$ make apidoc
$ make html
$ cp -r images _build/html/
There should be a generated _build
folder - navigate to _build/html/
and open index.html
in a web browser to view the documentation.