No announcement yet.

Docker, vrx_server caching and latest vrx update

  • Filter
  • Time
  • Show
Clear All
new posts

  • Docker, vrx_server caching and latest vrx update


    I am not super familiar with Docker and I had a question about caching. In the readme in vrx-docker it is written "After calling ./vrx_server/build_image.bash the first time, your image will be cached. This means that it will use the old image until this script is called again. If you update vrx_server/vrx-server/ or any file in vrx_server/vrx-server, those changes will not affect things until you call ./vrx_server/build_image.bash again after making the change".
    When I ran that command on the computer we used for dress rehearsal it simply used cached image for every layer. From my understanding it means vrx did not get updated. Indeed, the command "RUN hg clone" from the vrx-server Dockerfile was not run again which means that it would still have vrx from October 20th.
    I added 'ARG CACHEBUST=0' line 107 of vrx-docker/vrx_server/vrx-server/Dockerfile, right before the clone command to force it to update now.
    I might be misunderstanding something about how docker works, but I figured that if it was really an issue it might help some teams to make sure that they're testing their code with the latest version of the plugins.



  • #2

    Everything you say is correct. Not only is it the case that the server will not incorporate changes to local script files without a rebuild--it also has no way of detecting remote changes at all. If you want to make sure you have the very latest code, the solution you describe is a good one. You could also delete the image and build from scratch, but this takes a long time.

    Generally, we try to avoid running repository clone commands in the Dockerfile for this reason, but this one slipped by me.

    Anyway, it's very nice of you to publicize this tip! I think you're right that it may help some teams out if they are also new to Docker.



    • #3
      Thanks Michael,

      We just noticed that in the worlds generated by the vrx-docker using ./prepare_task_trials.bash dock and ./prepare_task_trials.bash scan_and_dock the task names are still the old ones ("dock" and "dock" instead of "scan" and "scan_and_dock"). Our work around is to delete theses files and copy and paste the worlds from vrx_gazebo/worlds/2019/phase2 into the vrx-docker/generated/task_generated worlds folders.