The contents of this folder are intended to demonstrate how to create a docker
image that can be run by ReRun. In order to be compatible with ReRun, this
docker image should exepct its inputs in a directory to be mounted at
/tmp/resim/inputs/
and populate the directory mounted at /tmp/resim/outputs/
with its logs and other outputs. To get started, we'll be using the resim_run
binary as our representative simulator to be run in ReRun. Since we want to test
this runner image out locally, we will use a test script test_run.sh
to stand
in for ReRun.
To run this example, it is assumed that you have cloned the resim-ai/open-core
repository and that you are operating inside of the development docker container
shipped with it. See the getting started guide for
more information.
The steps for running this example are as follows:
- Clone and navigate into to the
open-core
repository.
git clone https://github.com/resim-ai/open-core.git
cd open-core
- Start the development docker container.
./.devcontainer/run.sh
- Build the sim runner image. This builds the
//resim/simulator:resim_run
binary using bazel and then copies the resulting binary andrun_sim.sh
into thesim_runner:latest
docker image as it builds.
./resim/examples/sim_runner/build.sh
- Run the sim runner image. This will set up input and output directories in
/root/
which are mounted to/tmp/resim/
in the docker image when it is run. It also populates the/root/inputs
directory withexperience.sim
, which is the scenario description for this experience. It then runs thesim_runner:latest
container and prints the contents of the outputs directory.
./resim/examples/sim_runner/test_run.sh