GEO-BON / bon-in-a-box-pipelines

BON in a Box 2.0 - Sampling optimisation and indicator pipelines
MIT License
10 stars 7 forks source link

Avoid the need to reinstall custom packages #154

Open jmlord opened 2 months ago

jmlord commented 2 months ago

Whenever we have packages used locally, they need to be re-installed every time that new versions of the runners are pulled.

Option 1:

Option 2:

Workaround:

  1. Specify the digest in the dockerfile. This makes sure that the whole image will not be rebuilt because of an upstream image change. For example, use rocker/geospatial:4.4.1 in runners/r-dockerfile
  2. To build the local docker image, run ./.server/prod-server.sh command build runner-r
  3. To launch the server with this image, run ./.server/prod-server.sh command up -d
  4. Once done, stop the server with ./server-down.sh as usual.

Warning: This workaround bypasses the usual server update check. It is a good idea to run ./.server/prod-server.sh command pull once in a while, then resume with step 2 above.