CLI Reference

Dask-CHTC provides a command line tool called dask-chtc.

View the available sub-commands by running:

dask-chtc --help  # View available commands

Here’s the full documentation on all of the available commands:

dask-chtc

Command line tools for Dask-CHTC.

dask-chtc [OPTIONS] COMMAND [ARGS]...

Options

-v, --verbose

Show log messages as the CLI runs.

--version

Show the version and exit.

config

Inspect and edit Dask-CHTC’s configuration.

Dask-CHTC provides a Dask/Dask-Jobqueue configuration file which provides default values for the arguments of CHTCCluster. You can use the subcommands in this group to show, edit, or reset the contents of this configuration file.

See https://docs.dask.org/en/latest/configuration.html#yaml-files for more information on Dask configuration files.

dask-chtc config [OPTIONS] COMMAND [ARGS]...

edit

Opens your preferred editor on the configuration file.

Set the EDITOR environment variable to change your preferred editor.

dask-chtc config edit [OPTIONS]

path

Echo the path to the configuration file.

dask-chtc config path [OPTIONS]

reset

Reset the configuration file’s contents.

dask-chtc config reset [OPTIONS]

Options

--yes

Confirm the action without prompting.

show

Show the contents of the configuration file.

To show what Dask actually parsed from the configuration file, add the –parsed option.

dask-chtc config show [OPTIONS]

Options

--parsed

Show the parsed Dask config instead of the contents of the configuration file.

jupyter

Run a Jupyter notebook server as an HTCondor job.

Do not run Jupyter notebook servers on CHTC submit nodes except by using these commands!

Only one Jupyter notebook server can be created by this tool at a time. The subcommands let you create and interact with that server in various ways.

The “run” subcommand runs the notebook server as if you had started it yourself. If your terminal session ends, the notebook server will also stop.

The “start” subcommand runs the notebook server as a persistent HTCondor job: it will not be removed if your terminal session ends. The “status” subcommand can then be used to get information about your notebook server (like its contact address, to put into your web browser). The “stop” subcommand can be used to stop your started notebook server.

dask-chtc jupyter [OPTIONS] COMMAND [ARGS]...

run

Run a Jupyter notebook server as an HTCondor job.

The Jupyter notebook server will be connected to your terminal session: if you press Ctrl-c or disconnect from the server, your notebook server will end.

To start a notebook server that is not connected to your terminal session, use the “start” subcommand.

Extra arguments will be forwarded to Jupyter. For example, to start Jupyter Lab on some known port, you could run:

dask-chtc jupyter run lab –port 3456

dask-chtc jupyter run [OPTIONS] [JUPYTER_ARGS]...

Arguments

JUPYTER_ARGS

Optional argument(s)

start

Start a Jupyter notebook server as a persistent HTCondor job.

Just like the “run” subcommand, this will start a Jupyter notebook server and show you any output from it. Unlike the “run” subcommand, the Jupyter notebook server will not be connected to your terminal session: if you press Ctrl-c or disconnect from the server, your notebook server will continue running (though you will stop seeing output from it).

You can see the status of a persistent notebook server started by this command by using the “status” subcommand.

To start a notebook server that is connected to your terminal session, use the “run” subcommand.

Extra arguments will be forwarded to Jupyter. For example, to start Jupyter Lab on some known port, you could run

dask-chtc jupyter start lab –port 3456

dask-chtc jupyter start [OPTIONS] [JUPYTER_ARGS]...

Arguments

JUPYTER_ARGS

Optional argument(s)

status

Get information about your running Jupyter notebook server.

If you have started a Jupyter notebook server in the past and need to find it’s address again, use this command.

If you are trying to shut down your notebook server job and it is stuck in the REMOVED state, try running “dask-chtc jupyter stop –force”.

dask-chtc jupyter status [OPTIONS]

Options

--raw

Print the raw HTCondor job ad instead of the formatted output.

stop

Stop a Jupyter notebook server that was started via “start”.

If the –force option is given, the notebook server will be killed without giving it time to shutdown cleanly. We recommend always trying a normal stop first, then stopping it again with –force only if it is stuck in the REMOVED state for more than a few minutes (use the “status” subcommand to see its current state).

dask-chtc jupyter stop [OPTIONS]

Options

-f, --force

Stop your notebook server without giving it a chance to clean up.