modal nfs

Read and edit modal.NetworkFileSystem file systems.

Usage:

modal nfs [OPTIONS] COMMAND [ARGS]...

Options:

  • --help: Show this message and exit.

Commands:

  • create: Create a named network file system.
  • get: Download a file from a network file system.
  • list: List the names of all network file systems.
  • ls: List files and directories in a network file system.
  • put: Upload a file or directory to a network file system.
  • rm: Delete a file or directory from a network file system.

Create a named network file system.

Usage:

modal nfs create [OPTIONS] NAME

Arguments:

  • NAME: [required]

Options:

  • --cloud TEXT: Cloud provider to create the file system in. One of aws|gcp. [default: aws]
  • --env TEXT: Environment to interact with

If none is specified, Modal will use the default environment of your current profile (can also be specified via the environment variable MODAL_ENVIRONMENT). If neither is set, Modal will assume there is only one environment in the active workspace and use that one, or raise an error if there are multiple environments.

  • --help: Show this message and exit.

Download a file from a network file system.

Specifying a glob pattern (using any * or ** patterns) as the remote_path will download all matching files, preserving the source directory structure for the matched files.

For example, to download an entire network file system into dump_volume:

modal nfs get <volume-name> "**" dump_volume

Use ”-” (a hyphen) as LOCAL_DESTINATION to write contents of file to stdout (only for non-glob paths).

Usage:

modal nfs get [OPTIONS] VOLUME_NAME REMOTE_PATH [LOCAL_DESTINATION]

Arguments:

  • VOLUME_NAME: [required]
  • REMOTE_PATH: [required]
  • [LOCAL_DESTINATION]: [default: .]

Options:

  • --force / --no-force: [default: no-force]
  • --env TEXT: Environment to interact with

If none is specified, Modal will use the default environment of your current profile (can also be specified via the environment variable MODAL_ENVIRONMENT). If neither is set, Modal will assume there is only one environment in the active workspace and use that one, or raise an error if there are multiple environments.

  • --help: Show this message and exit.

List the names of all network file systems.

Usage:

modal nfs list [OPTIONS]

Options:

  • --env TEXT: Environment to interact with

If none is specified, Modal will use the default environment of your current profile (can also be specified via the environment variable MODAL_ENVIRONMENT). If neither is set, Modal will assume there is only one environment in the active workspace and use that one, or raise an error if there are multiple environments.

  • --json / --no-json: [default: no-json]
  • --help: Show this message and exit.

List files and directories in a network file system.

Usage:

modal nfs ls [OPTIONS] VOLUME_NAME [PATH]

Arguments:

  • VOLUME_NAME: [required]
  • [PATH]: [default: /]

Options:

  • --env TEXT: Environment to interact with

If none is specified, Modal will use the default environment of your current profile (can also be specified via the environment variable MODAL_ENVIRONMENT). If neither is set, Modal will assume there is only one environment in the active workspace and use that one, or raise an error if there are multiple environments.

  • --help: Show this message and exit.

Upload a file or directory to a network file system.

Remote parent directories will be created as needed.

Ending the REMOTE_PATH with a forward slash (/), it’s assumed to be a directory and the file will be uploaded with its current name under that directory.

Usage:

modal nfs put [OPTIONS] VOLUME_NAME LOCAL_PATH [REMOTE_PATH]

Arguments:

  • VOLUME_NAME: [required]
  • LOCAL_PATH: [required]
  • [REMOTE_PATH]: [default: /]

Options:

  • --env TEXT: Environment to interact with

If none is specified, Modal will use the default environment of your current profile (can also be specified via the environment variable MODAL_ENVIRONMENT). If neither is set, Modal will assume there is only one environment in the active workspace and use that one, or raise an error if there are multiple environments.

  • --help: Show this message and exit.

Delete a file or directory from a network file system.

Usage:

modal nfs rm [OPTIONS] VOLUME_NAME REMOTE_PATH

Arguments:

  • VOLUME_NAME: [required]
  • REMOTE_PATH: [required]

Options:

  • -r, --recursive: Delete directory recursively
  • --env TEXT: Environment to interact with

If none is specified, Modal will use the default environment of your current profile (can also be specified via the environment variable MODAL_ENVIRONMENT). If neither is set, Modal will assume there is only one environment in the active workspace and use that one, or raise an error if there are multiple environments.

  • --help: Show this message and exit.