git clone https://github.com/Auc7us/chrono-docker/
Install Git LFS and
git lfs pull
2. Install Docker Engine
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
3. Install Nvidia Container Toolkit
sudo apt update
sudo apt install python3-venv -y
-
Build the docker image
chmod +x setup_chrono_docker.sh ./setup_chrono_docker.sh -
Inside the container, build Chrono in the persistent mount directory on host using :
cd .. chmod +x buildChronoInMount.sh ./buildChronoInMount.sh
-
Activate the pip3 virtual env to use atk
cd chrono-docker source ../.chrono-env/bin/activate -
To spin up and attach to the container
atk dev -ua -s chrono -o x11 gpus -
To docker compose down, build, spin up and attach to the container
atk dev -dbua -s chrono -o x11 gpus -
Understanding -dbua flags:
- d : Stop and remove containers (docker compose down)
- b : Build docker image (docker build)
- u : Spin up a new docker container (docker compose up)
- a : Attach to a running docker container (docker exec or docker attach)
-
atk is a simple wrapper around docker compose, additional information can be found here
- Inside the container
- Python demos
cd ~/mountdir/chrono/src/demos/python/robot/ python3 demo_ROBOT_Viper_Rigid.py - C++ demos
cd ~/mountdir/chrono/build/bin/ ./demo_ROBOT_Viper_Rigid
- Python demos
-
For additional Chrono modules, edit the CMake flags in buildChronoInMount.sh
-
You can find information on building Chrono and available modules on our website