Skip to content

PEDL Commands

A command is a schedulable task that is executed in a containerized environment on a PEDL cluster. Any code, binaries, or scripts you can execute via command line on your local machine can be executed on a PEDL cluster by prefixing the original command with pedl cmd run or pedl command run. Commands are a great way to run workflows that may not easily fit into the standard PEDL experiment workflow, while still getting the benefits of PEDL features such as resource scheduling and dependency management.

See the Quick Start PEDL command page for an introduction.

Configuration

The command configuration file may contain the following fields. All fields are optional unless otherwise specified.

  • description: A human-readable description of the command. This does not need to be unique. The default description consists of a timestamp and the entrypoint of the command.
  • environment: Specifies the environment of the container that is used to execute the command.
    • dependencies: In the case where custom_image is empty, PEDL will use the environment configuration provided by the following keys. Default values are specified in bold:
      • os: The operating system used for the environment. Required to be "ubuntu16.04".
      • cuda: The CUDA version (if any) used for the environment. Accepted values are "9.0" and "none".
      • python: The Python version that is used for the environment. Required to be "3.6.8".
      • tensorflow: The TensorFlow version (if any) that is installed. Accepted values are "1.12.0", "1.11.0", "1.10.0", and "none".
      • pytorch: The PyTorch version (if any) that is installed. Accepted values are "1.0.0" and "none".
      • keras: The Keras version (if any) that is installed. Accepted values are "2.2.4" and "none".
    • runtime_commands: Specifies a list of shell commands to execute before running the PEDL command.
    • runtime_packages: Specifies a list of Python packages to install before running the PEDL command.
    • custom_image: Specifies a custom Docker base image to use when executing the command. The custom image must be available via docker pull to every PEDL agent host in the cluster. If a custom_image is specified, the dependencies section is ignored—it is up to the user to ensure the required dependencies are installed. runtime_commands and runtime_packages may be used to execute install additional dependencies and Python packages before the PEDL command is executed. If runtime_packages are specified, it is assumed that pip is installed in the custom Docker image.
    • registry_auth: Specifies the Docker registry credentials to use when pulling a custom base Docker image, if needed.
      • server (required)
      • username (required)
      • password (required)
      • email (optional)
  • resources: The resources PEDL allows a command to use.
    • slots: Specifies the number of slots to use for the command. The default value is 1. The maximum value is the number of slots on the agent in the cluster with the most slots. For example, PEDL will be unable to schedule a command that requests 4 slots if the PEDL cluster is composed of agents with 2 slots each.
  • bind_mounts: Specifies a collection of directories that are bind-mounted into the Docker containers for execution. This can be used to allow commands to access additional data that is not contained in the command context. This field should consist of an array of entries. Note that users should ensure that the specified host paths are accessible on all agent hosts (e.g., by configuring a network file system appropriately). Defaults to an empty list.
    • host_path (required): The file system path on each agent to use.
    • container_path (required): The file system path in the container to use.
    • read_only: Whether the bind-mount should be a read-only mount. Defaults to false.
    • propagation: (Advanced users only) Optional propagation behavior for replicas of the bind-mount. Defaults to rprivate.

Hint

In addition to --config-file, pedl cmd run offers a --config flag to directly set configuration options from the command line with field=value syntax. field can use the dot character (.) to indicate nested fields (e.g. environment.dependencies.python). value will be interpreted as a comma-separated list if it contains any commas. Options set by --config take precedence over those set by --config-file.