Installation#

Installation of ManiSkill is extremely simple, you only need to run a few pip installs

# install the package
pip install --upgrade mani_skill
# install a version of torch that is compatible with your system
pip install torch torchvision torchaudio

You can also install the main mani_skill package from github/source:

# GitHub
pip install --upgrade git+https://github.com/haosulab/ManiSkill.git

# Source
git clone https://github.com/haosulab/ManiSkill.git
cd ManiSkill && pip install -e .

# remember to install a version of torch that is compatible with your system
pip install torch torchvision torchaudio

Note

While state-based simulation does not require any additional dependencies, a GPU with the Vulkan driver installed is required to enable rendering in ManiSkill. See here for how to install and configure Vulkan on Ubuntu. Furthermore we currently best support linux machines with NVIDIA GPUs, with limited support on other systems, see the system requirements section for details.

The rigid-body tasks, powered by SAPIEN, are ready to use after installation. Test your installation:

# Run an episode (at most 50 steps) of "PickCube-v1" (a rigid-body task) with random actions
# Or specify an task by "-e ${ENV_ID}"
python -m mani_skill.examples.demo_random_action

A docker image is also provided on Docker Hub called haosulab/mani-skill and its corresponding Dockerfile.

Once you are done here, you can head over to the quickstart page to try out some live demos and start to program with ManiSkill.

System Support#

We currently best support Linux based systems. There is limited support for windows and no support for MacOS at the moment. We are working on trying to support more features on other systems but this may take some time. Most constraints stem from what the SAPIEN package is capable of supporting.

System / GPU

CPU Sim

GPU Sim

Rendering

Linux / NVIDIA GPU

Windows / NVIDIA GPU

Windows / AMD GPU

WSL / Anything

MacOS / Anything

Troubleshooting#

Vulkan#

To install Vulkan on Ubuntu:

sudo apt-get install libvulkan1

To test your installation of Vulkan:

sudo apt-get install vulkan-utils
vulkaninfo

If vulkaninfo fails to show the information about Vulkan, please check whether the following files exist:

  • /usr/share/vulkan/icd.d/nvidia_icd.json

  • /usr/share/glvnd/egl_vendor.d/10_nvidia.json

  • /etc/vulkan/implicit_layer.d/nvidia_layers.json (optional, but necessary for some GPUs like A100)

If /usr/share/vulkan/icd.d/nvidia_icd.json does not exist, try to create the file with the following content:

{
    "file_format_version" : "1.0.0",
    "ICD": {
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.2.155"
    }
}

If /usr/share/glvnd/egl_vendor.d/10_nvidia.json does not exist, you can try sudo apt-get install libglvnd-dev. 10_nvidia.json contains the following content:

{
    "file_format_version" : "1.0.0",
    "ICD" : {
        "library_path" : "libEGL_nvidia.so.0"
    }
}

If /etc/vulkan/implicit_layer.d/nvidia_layers.json does not exist, try to create the file with the following content:

{
    "file_format_version" : "1.0.0",
    "layer": {
        "name": "VK_LAYER_NV_optimus",
        "type": "INSTANCE",
        "library_path": "libGLX_nvidia.so.0",
        "api_version" : "1.2.155",
        "implementation_version" : "1",
        "description" : "NVIDIA Optimus layer",
        "functions": {
            "vkGetInstanceProcAddr": "vk_optimusGetInstanceProcAddr",
            "vkGetDeviceProcAddr": "vk_optimusGetDeviceProcAddr"
        },
        "enable_environment": {
            "__NV_PRIME_RENDER_OFFLOAD": "1"
        },
        "disable_environment": {
            "DISABLE_LAYER_NV_OPTIMUS_1": ""
        }
    }
}

More discussions can be found here.


The following errors can happen if the Vulkan driver is broken. Try to reinstall it following the above instructions.

  • RuntimeError: vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed

  • Some required Vulkan extension is not present. You may not use the renderer to render, however, CPU resources will be still available.

  • Segmentation fault (core dumped)

If you still have some issues, you can check the NVIDIA drivers. First run

ldconfig -p | grep libGLX_nvidia

If libGLX_nvidia.so is not found, they it is likely that you have installed an incorrect driver. To get the right driver on linux, it is recommended to install nvidia-driver-xxx (do not use the ones with server in the package name) and to avoid using any other method of installation like a runfile

Uninstallation#

If mani_skill is installed through pip, run pip uninstall mani-skill.

Note

There might exist some cache files (e.g., compiled shared library files, convex meshes generated by SAPIEN) generated in the package directory. There may also be data downloaded to your ~/.maniskill directory. To fully uninstall mani_skill, please remove those files manually.