Setup Strategies

Viash supports the use of several different Docker setup strategies. You can choose what strategy to build an executable with when using a Docker backend by passing the --setup option followed by one of the strategies below.

For example:

viash build config.vsh.yaml -p docker --setup alwayscachedbuild

Build

  • alwaysbuild / build / b: Always build the image from the dockerfile. This is the default setup strategy.
  • alwayscachedbuild / cachedbuild / cb: Always build the image from the dockerfile, with caching enabled.
  • ifneedbebuild: Build the image if it does not exist locally.
  • ifneedbecachedbuild: Build the image with caching enabled if it does not exist locally.

Pull

  • alwayspull / pull / p: Try to pull the container from Docker Hub or the specified docker registry.
  • alwayspullelsebuild / pullelsebuild: Try to pull the image from a registry and build it if it doesn’t exist.
  • alwayspullelsecachedbuild / pullelsecachedbuild: Try to pull the image from a registry and build it with caching if it doesn’t exist.
  • ifneedbepull: If the image does not exist locally, pull the image.
  • ifneedbepullelsebuild If the image does not exist locally, pull the image. If the image does exist, build it.
  • ifneedbepullelsecachedbuild: If the image does not exist locally, pull the image. If the image does exist, build it with caching enabled.

Push

Do nothing

  • donothing / meh: Do not build or pull anything.