Files
openpi/examples/libero/README.md
Ury Zhilinsky 385780ecc3 Initial commit
2024-12-23 13:38:06 -08:00

1.1 KiB

LIBERO Benchmark

This example runs the LIBERO benchmark: https://github.com/Lifelong-Robot-Learning/LIBERO

Note: When updating requirements.txt in this directory, there is an additional flag --extra-index-url https://download.pytorch.org/whl/cu113 that must be added to the uv pip compile command.

With Docker

# Grant access to the X11 server:
sudo xhost +local:docker

export SERVER_ARGS="--env LIBERO"
docker compose -f examples/libero/compose.yml up --build

Without Docker

Terminal window 1:

# Create virtual environment
uv venv --python 3.8 examples/libero/.venv
source examples/libero/.venv/bin/activate
uv pip sync examples/libero/requirements.txt third_party/libero/requirements.txt --extra-index-url https://download.pytorch.org/whl/cu113 --index-strategy=unsafe-best-match
uv pip install -e packages/openpi-client
uv pip install -e third_party/libero
export PYTHONPATH=$PYTHONPATH:$PWD/third_party/libero

# Run the simulation
python examples/libero/main.py

Terminal window 2:

# Run the server
uv run scripts/serve_policy.py --env LIBERO