This directory contains example scripts for training policies in K-Sim.
While not strictly necessary, we recommend using ksim with a GPU - we do most of our development on 4090s, but other GPUs should work as well, although you might encounter minor bugs.
To get started, follow these instructions:
- Clone this repository:
git clone git@github.com:kscalelabs/ksim.git
cd ksim-
Create a new Python environment (requires Python 3.11 or later). We recommend using uv.
-
Install
ksim:
pip install ksim # To install the public version
pip install -e '.' # To install your local copy- Run an example script:
python -m examples.walkingIf you're getting segfaults on Mujoco on a Linux-based headless GPU machine, you can force CPU rendering:
export MUJOCO_GL=osmesaThis will require:
sudo apt-get install -y libosmesa6 libosmesa6-dev