Manage Inferless volumes

$ inferless volume COMMAND [OPTIONS] [ARGS]...

Commands:

  • create: Create a new volume.
  • cp: Add a file or directory to a volume.
  • ls: List files and directories within a volume.
  • rm: Specify the Inferless path to the file.
  • list: List all existing volumes.
  • select: Select a volume for the current Inferless configuration file.

Usage:

Create a new volume

$ inferless volume create [OPTIONS]

Options:

  • -n, --name TEXT: Assign a name to the new volume.

Examples:

$ inferless volume create -n my-volume 

You will be asked for the prompt

Prompt : ‘Region’

List all the volumes

$ inferless volume list [OPTIONS]

Options:

  • -r, --region TEXT: specify the region where you want to create the runtime.

Examples:

$ inferless volume list -r region-1

Copy files to a volume

$ inferless volume cp [OPTIONS]

Options:

  • -s, --source TEXT: Specify the source path (either a local directory/file path or an Inferless path)
  • -d, --destination TEXT: Specify the destination path (either a local directory/file path or an Inferless path)
  • -r, --recursive: Recursively copy the contents of a directory to the destination.
  • --help: Show this message and exit.

Examples:

To copy from local to remote volume

$ inferless volume cp -s /path/to/local/file -d infer://volume/region/<volume_name>/path/file

To copy from remote to local volume

$ inferless volume cp -s infer://volume/region/<volume_name>/path/file -d /path/to/local/file

List files and directories within a volume

$ inferless volume ls [OPTIONS]

Options:

  • -i, --id TEXT: Specify the ID of the volume to list.
  • -p, --path TEXT: Define a specific directory path within the volume. Defaults to the root directory if not specified.
  • -d, --directory: List only directories.
  • -f, --files: List only files.
  • -r, --recursive: Recursively list contents of directories.
  • --help: Show this message and exit.

Examples:

$ inferless volume ls -i volume-id -p /path/to/directory

Remove a file or directory from a volume

$ inferless volume rm [OPTIONS]

Options:

  • -p, --path TEXT: Infer Path to the file/dir your want to delete

Examples:

$ inferless volume rm -p infer://volume/region/<volume_name>/path/file

Upate the inferless.yaml configuration file with the volume

Usage:

$ inferless volume select [OPTIONS]

Options:

  • -p, --path TEXT: Path to the Inferless configuration file (typically inferless.yaml)
  • -i, --id TEXT: The ID of the volume to select.

Examples:

$ inferless volume select -p inferless.yaml -i volume-id