princeton-ddss / blackfish

Machine learning as a service (MLaaS) for busy researchers
https://princeton-ddss.github.io/blackfish/
0 stars 0 forks source link

Check for image availability #33

Open cswaney opened 2 months ago

cswaney commented 2 months ago

The thing here is that the CLI lists available services in the help message:

blackfish run --help
...
Commands:
  speech-recognition  Start service MODEL.
  text-generate       Start service MODEL.

A user will reasonably assume that the listed services are available. So perhaps it is better to simply include logic to check that the required image is available when the user tries to run the service:

blackfish run ... speech-recognition

If the image isn't available, then we return a message. The check should be performed within the service endpoint so that we can also return an error to the UI.

For slurm profiles, we need to check for images in the remote cache (default) and home (backup) directories.

For local profiles, we need to check for images available from Docker or images in the cache and home directories, depending on the container provider available (Docker or Apptainer).