Installation

Local installation

Note

Prerequisites:
  • Python 3

  • Conda

  • CUDA (if GPU is used)

Clone the repository

git clone https://github.com/PierreExeter/rl_reach.git && cd rl_reach/code/

Install and activate the Conda environment

conda env create -f environment.yml
conda activate rl_reach

Note

This Conda environment assumes that you have CUDA 11.1 installed. If you are using another version of CUDA, you will have to install Pytorch manually as indicated here.

Test the installation

Manual tests

python tests/manual/1_test_widowx_env.py
python tests/manual/2_test_train.py
python tests/manual/3_test_enjoy.py
python tests/manual/4_test_pytorch.py

Automated tests

pytest tests/auto/all_tests.py -v

Docker installation

Note

The GPU image requires nvidia-docker.

Clone the repository

git clone https://github.com/PierreExeter/rl_reach.git && cd rl_reach/

Pull the Docker image (CPU or GPU)

# CPU
docker pull rlreach/rlreach-cpu:latest
# GPU
docker pull rlreach/rlreach-gpu:latest

or build the images from the Dockerfiles

# CPU
docker build -t rlreach/rlreach-cpu:latest . -f docker/Dockerfile_cpu
# GPU
docker build -t rlreach/rlreach-gpu:latest . -f docker/Dockerfile_gpu

Test the Docker images

# CPU
./docker/run_docker_cpu.sh pytest tests/auto/all_tests.py -v
# GPU
./docker/run_docker_gpu.sh pytest tests/auto/all_tests.py -v

CodeOcean

A reproducible capsule is available on the CodeOcean platform.