Skip to content

Commit

Permalink
Improve installation (#220)
Browse files Browse the repository at this point in the history
* Improve installation process

* Remove requirements.txt from tests

* Fix unit test link

* Add extra env variable to readme

* Minor typo

* Fix coppeliasim link

* Clean up gh actions

* Remove travis ci

* Add comment
  • Loading branch information
eugeneteoh committed Apr 8, 2024
1 parent 7c3f425 commit eece2ab
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 189 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/task_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,11 @@ jobs:
# start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
cur=`pwd`
wget http://www.coppeliarobotics.com/files/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
wget https://downloads.coppeliarobotics.com/V4_1_0/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
tar -xf CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
export COPPELIASIM_ROOT="$cur/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT:$COPPELIASIM_ROOT/platforms
export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT
# Install PyRep
git clone https://github.com/stepjam/PyRep.git
cd PyRep
pip3 install -r requirements.txt
pip3 install setuptools
pip3 install .
# Gym needed for some of unit tests
pip3 install gym
cd ../
pip3 install -r requirements.txt
pip install ".[dev]"
python3 -m unittest discover tests/demos
16 changes: 3 additions & 13 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,13 @@ jobs:
sudo apt-get install -y xvfb qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev qt5-default qttools5-dev-tools
# start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
# Save CoppeliaSim as a gh action artifact
cur=`pwd`
wget http://www.coppeliarobotics.com/files/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
wget https://downloads.coppeliarobotics.com/V4_1_0/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
tar -xf CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
export COPPELIASIM_ROOT="$cur/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT:$COPPELIASIM_ROOT/platforms
export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT
# Install PyRep
git clone https://github.com/stepjam/PyRep.git
cd PyRep
pip3 install -r requirements.txt
pip3 install setuptools
pip3 install .
# Gym needed for some of unit tests
pip3 install gym
cd ../
pip3 install -r requirements.txt
pip install ".[dev]"
python3 -m unittest discover tests/unit
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,23 @@ few-shot learning. [Click here for website and paper.](https://sites.google.com/

## Install

RLBench is built around PyRep and V-REP. First head to the
[PyRep github](https://github.com/stepjam/PyRep) page and install.
RLBench is built around CoppeliaSim v4.1.0 and [PyRep](https://github.com/stepjam/PyRep).

**If you previously had PyRep installed, you will need to update your installation!**

Hopefully you have now installed PyRep and have run one of the PyRep examples.
Now lets install RLBench:
First, install CoppeliaSim:

```bash
pip install -r requirements.txt
pip install .
# set env variables
export COPPELIASIM_ROOT=${HOME}/CoppeliaSim
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COPPELIASIM_ROOT
export QT_QPA_PLATFORM_PLUGIN_PATH=$COPPELIASIM_ROOT

wget https://downloads.coppeliarobotics.com/V4_1_0/CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
mkdir -p $COPPELIASIM_ROOT && tar -xf CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz -C $COPPELIASIM_ROOT --strip-components 1
rm -rf CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar.xz
```
Or you can install directly via pip

To install the RLBench python package:

```bash
pip install git+https://github.com/stepjam/RLBench.git
```
Expand Down
15 changes: 13 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import codecs
import os.path

# cffi required by pyrep
# dynamically install cffi before anything else
try:
import cffi
except ImportError:
import subprocess
import sys
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'cffi==1.14.2'])

from setuptools import setup


Expand All @@ -24,12 +33,11 @@ def get_version(rel_path):
else:
raise RuntimeError("Unable to find version string.")


core_requirements = [
"pyrep @ git+https://github.com/stepjam/PyRep.git@076ca15c57f2495a4194da03565891ab1aaa317e",
"numpy",
"Pillow",
"pyquaternion",
"html-testRunner",
"natsort"
]

Expand All @@ -51,6 +59,9 @@ def get_version(rel_path):
'rlbench.assets',
'rlbench.gym'
],
extras_require={
"dev": ["html-testRunner", "gym"]
},
package_data={'': ['*.ttm', '*.obj', '**/**/*.ttm', '**/**/*.obj'],
'rlbench': ['task_design.ttt']},
)
59 changes: 0 additions & 59 deletions travisci_generate_index.py

This file was deleted.

34 changes: 0 additions & 34 deletions travisci_run_tests.py

This file was deleted.

0 comments on commit eece2ab

Please sign in to comment.