In mlrun, what is the difference between mlrun.auto_mount()
vs mlrun.mount_v3io()
?
when should auto_mount()
or mount_v3io()
be used?
1 Answers
Before discussing these functions, it's important to note that MLRun has an auto-mount feature (don't confuse with the function) which means that every function created will get a default mount applied to it, with logic that is described in the documentation linked below. This means that unless you have a need to apply a mount with specific parameters or configuration, in most cases you shouldn't have to use any of these functions.
Please refer to https://docs.mlrun.org/en/stable/runtimes/function-storage.html for additional details on auto-mount.
As for these functions - both of them are modifiers that can be applied to an MLRun function to modify its execution spec in some way. Both should be used through the apply
function, such as:
function.apply(mlrun.auto_mount())
The difference between them is that the mount_v3io
function is used solely to create a v3io
volume mount. The auto_mount
modifier may create a PVC
mount or a v3io
mount based on environment variables - it tries to deduce the correct configuration to use.
Refer to https://docs.mlrun.org/en/stable/api/mlrun.platforms.html for documentation of these modifiers and others.

- 21
- 2