- Prerequisites
- Building the Image
- Starting the Container
- Attaching to the Container
- Running a GymChrono Test
To be able to follow this quickstart guide, you must have:
- A modern browser installed (such as chrome)
- A copy of this repository cloned on a local machine
- Docker installed on your system
- Install the NVIDIA container toolkit
- The OptiX 7.7.0 script for linux downloaded and placed in the
/gym-chrono/docker/optix/
directory
Navigate to this folder, and run the following command in a bash shell:
docker build -t <REPOSITORY>:<TAG> .
with <REPOSITORY>
replaced by the name you would like for the container, and a version number as the <TAG>
.
Note
Building and saving the container image may take a while as chrono
, cuda
and stable-baselines3
must be built, and large amounts of data must be copied.
Note
If the build fails on the final step, this may be due to google drive quotas being reached. If this is the case, it is recommended to wait 24 hours so the quotas reset, or comment this line, and run the gymchrono.sh
script manually once starting the container.
In order to run the container, run the following command in a bash shell:
docker run -d -p <LOCAL_PORT1>:5901 -p <LOCAL_PORT2>:6901 --gpus all <REPOSITORY>:<TAG>
In the above command, replace <REPOSITORY>
and <TAG>
with the names used in the previous section. Replace <LOCAL_PORT1>
and <LOCAL_PORT2>
with the desired target ports for the service. For example, if ports 5901 and 6901 are not used by another service, these can be used. Otherwise, you may consider using other ports. A full example command is included below.
docker run -d -p 5902:5901 -p 6902:6901 --gpus all gymchrono:v1.0
To view the output of the vnc service, go to your modern browser and in the address bar go to localhost:<LOCAL_PORT2>
(in the above full example, this would be localhost:6902
). You should be prompted for a password, which will be sbel
. After entering the password, you should see this desktop appear:
To access a terminal window, you can either use the vnc gui, or attach to the container using the following command:
docker exec -it <CONTAINER_NAME> bash
and replacing <CONTAINER_NAME>
with the name of the container, or the container id
Note
You can get the name of the container or the container ID by running docker ps
To test that GymChrono is functioning as expected, navigate to /sbel/Desktop/gym-chrono/gym_chrono/test
within the container, and run python3 off_road_gator_test.py
. You should see the following rendering in your browser window:
Note
Chrono::Robot is not currently functional in this container, so the Cobra demos will not work.