AI Workbench Mounts
Mounts allow users to define mount points for the external data required by an AI Workbench project.
In addition to the target path within the container for each mount, users can also pass a comma separated list of mount options. Each mount target must be an absolute path (i.e. beginning with a ‘/’ character) and unique within the container.
If a new Mount is created while the project container is running, you must restart the project container for the changes to take effect.
A Mount may not be deleted while the project container is running
There are four types of mounts that may be defined: project
, host
, volume
, temp
.
- Project
This mount type defines where the project repository directory is mounted within the project container. When an AI Workbench project is created, a project mount type is added by default with
/project/
as the target path within the container for the project directory. There can only be a single project mount type in a project.- Host
This mount type allows the user to mount a directory from the host machine into the project container.
NoteThe target directory for a host mount type must exist in the project container. This is to avoid permissions/ownership errors as Docker may create the directory as owned by root, if it doesn’t exist. See below for more detail.
- Volume
This mount type creates a persistent volume for storing data that is not erased when the project container is stopped or re-built. However, deleting the mount or project results in the persistent volume being deleted as well. For named volume mounts, the volume name should be passed as a mount option as
volumeName=abc
- Temp
This mount type creates a temporary file in the project container that is reset every time the container is started.
Creating a Mount
Open AI Workbench window and select the location
Select an existing project
Select the
Environment
tab on the leftNavigate to the
Mounts
section and click on the Add buttonFill out the form and click on the Add button to create the mount
Deleting a Mount
Open AI Workbench window and select the location
Select an existing project
Select the Environment tab on the left
Navigate to the Mounts section and click on the 3 dots and select Remove Host/Volume/Temp Mount
Click on Remove to delete the mount
Creating a mount through the CLI only creates the definition for it. Mounts have to be configured by running nvwb configure mounts
before they can be used.
Creating a Mount
Open the terminal and activate the desired context (location)
Run
nvwb open
to open an existing projectRun
nvwb create mount
Select the mount type
Enter the target directory for the mount
Enter an optional description
Enter mount options, if any
Run
nvwb configure mounts
. Select the mount to configure. Enter the mount source for Host type mount.
Deleting a Mount
Open the terminal and activate the desired context (location)
Run
nvwb open
to open an existing projectRun
nvwb delete mount
Select the mount to delete. You are not prompted for confirmation
There are some differences between how Host mounts are treated by Podman and Docker across macOS, Windows, and Linux. To ensure your Host mounts always work as expected, always make sure the target directory exists in the project container prior to creating the Host mount.
The easiest way to do this is to use the postInstall.bash
script and add something like:
sudo mkdir -p /mnt/my-host-mount
sudo chmod workbench:workbench /mnt/my-host-mount
If you are using a container that uses a different user than workbench you may need to adjust this command.