Install

It is recommended to read the Packages section first to understand the packages organisation.

The CORE package DeepPhysX.Core is always installed by default.
Using a SIMULATION package is recommended but not required.
At least one AI package is mandatory (default one is DeepPhysX.Torch).

Prerequisites

DeepPhysX packages have the following dependencies :

Package

Dependency

Type

Install

DeepPhysX_Core

Numpy

Required

pip install numpy

Vedo

Required

pip install vedo

Tensorboard

Required

pip install tensorboard

SSD

Required

pip install SimulationSimpleDatabase

DeepPhysX_Sofa

SOFA Framework

Required

Follow instructions

SofaPython3

Required

Follow instructions

Caribou

Optional

Follow instructions

DeepPhysX_Torch

PyTorch

Required

pip install torch

Note

DeepPhysX.Sofa has a dependency to Caribou to run the demo scripts from Examples/SOFA/Demo since implemented simulations involve some of its components.

Install

Install with pip

DeepPhysX packages are all registered on PyPi. They can easily be installed with pip:

$ pip3 install DeepPhysX
$ pip3 install DeepPhysX.Sofa
$ pip3 install DeepPhysX.Torch

Then, you should be able to run:

$ pip3 show DeepPhysX
$ pip3 show DeepPhysX.Sofa
$ pip3 show DeepPhysX.Torch
import DeepPhysX.Core
import DeepPhysX.Sofa
import DeepPhysX.Torch

Install from sources

DeepPhysX packages must have the following architecture. These detailed instructions will build such an installation:

DeepPhysX
 ├── Core
 ├── Sofa
 └── Torch

Start by cloning the DeepPhysX source code from its Github repository in a directory named DeepPhysX/Core:

$ mkdir DeepPhysX
$ cd DeepPhysX
$ git clone https://github.com/mimesis-inria/DeepPhysX.git Core

Then, you can add compatibility layers to your DeepPhysX environment and install packages:

  • Option 1 (recommended): run one of the setup_.py scripts that handle the installation of all packages

    • Use setup_user.py to install and manage packages with pip as non-editable.

      $ python3 setup_user.py
      
    • Use setup_dev.py to link packages in the site-packages.

      $ python3 setup_dev.py set
      

    Note

    Both scripts will asks the packages to install and will automatically clone missing packages.

  • Option 2: clone the corresponding Github repositories in the created DeepPhysX directory, then install packages manually.

    # Clone compatibility layers
    $ git clone https://github.com/mimesis-inria/DeepPhysX.Sofa.git Sofa
    $ git clone https://github.com/mimesis-inria/DeepPhysX.Torch.git Torch
    
    # Install packages manually
    $ cd Core ; pip3 install .
    $ cd ../Sofa ; pip3 install .
    $ cd ../Torch ; pip3 install .
    

Finally, you should be able to run:

# If installed with pip
$ pip3 show DeepPhysX
$ pip3 show DeepPhysX.Sofa
$ pip3 show DeepPhysX.Torch
# In both cases
import DeepPhysX.Core
import DeepPhysX.Sofa
import DeepPhysX.Torch