LouKordos / walking_controller

The main walking controller code for the Bipedal Robot.
14 stars 3 forks source link

Wrapper script for Docker run and compile and backing up snapshots of source code #69

Open LouKordos opened 3 years ago

LouKordos commented 3 years ago

Since it is often useful to have a snapshot of the exact source code that was run to produce a certain result, a wrapper script that is used instead of docker build and docker run would be a good idea.

The script should create an ISO 8601 standard timestamp as the tag for the generated Docker image. The generated tags should be stored somewhere and the run script should pull the latest timestamp and run the docker container. Maybe add a sync script that also pushes the images as a backup.

As an additional backup, @WPBack taking the latest commit id, then generating or somehow getting the diff file for the entire directory (or only the ./src/ directory and saving that along with a timestamp and the latest Commit hash as well.

Both could be implemented in the same script as two separate backups. For this to make actual sense, #67 and ideally #5 , #8 and #61 should be closed first.

LouKordos commented 3 years ago

Probably a good idea to add the commit hash to the docker image as well somehow, maybe simply by writing it to a file inside the container.

LouKordos commented 3 years ago

Also incorporate the branch name into the tag or the files in the container somehow.

LouKordos commented 3 years ago

Also dockerize gazebo properly and combine that into the wrapper script, in order to be able to run one command and have everything up and running.

LouKordos commented 3 years ago

Container tag should look like this: [checked-out-branch-name]-[commit-hash]-[generated-uuid]. The script called something like run_controller should generate the tag, build the container, create a directory in plot_data for this run for the logs, a file containing the commit hash, a full diff with that commit as the base. Also consider the case where the user wants to run the container twice in a row, should a separate directory be generated for that?