We use docker to setup the development environment for
Jade
. We need to build the docker image once; after that, we can iterate:
- Develop
Jade
feature. - Build a python wheel of
Jade
. - Install the newly built wheel in a python envrionment (conda, virtualenv, e.t.c.).
- Test the new feature.
You need to install
docker
(we assume that you are using Ubuntu). Follow the instruction. After the
installation, you should be able to run sudo docker run hello-world
.
Then you need to do the docker post installation
config
so that you can invoke docker
command without elevating to root
. The key steps are:
sudo groupadd docker
sudo usermod -aG docker $USER
To be sure, reboot after the post-installation config; after rebooting, you
should be able to run docker run hello-world
without sudo
.
You need to ensure your glibc>=2.28
. To check, run
ldd --version
You only need to execute this once. In this directory, run
python bdocker_image.py
Alternatively, get a pre-built image
docker pull linfenglee/adamas-env:latest
docker tag linfenglee/adamas-env:latest adamas-env:latest
In this directory, run
python bwheel.py
The output wheel should be located at
<repo root>/wheelhouse/nimblephysics-0.7.7-cp38-cp38-manylinux_2_28_x86_64.whl
The bwheel.py
script has one opton --cache
. When supplied, it will not clean
the previous CMake
cache. This speeds up the build.
python bwheel.py --cache
In the this directory, with your own python environment activated, run
pip uninstall -y nimblephysics && pip install ../wheelhouse/nimblephysics-0.7.7-cp38-cp38-manylinux_2_28_x86_64.whl
The flag -I
removes existing installed nimblephysics
.
You can install other dependencies (e.g., torch
) as usual.