Manage DSS

This guide describes how to manage Data Science Stack (DSS).

DSS is a Command Line Interface (CLI)-based environment and distributed as a snap.

Install DSS

Note

To install DSS, ensure you have previously installed Snap and MicroK8s.

You can install DSS using snap as follows:

sudo snap install data-science-stack

Then, you can run the DSS CLI with:

dss

Start DSS

You can initialise DSS through dss initialize. This command:

  • Stores credentials for the MicroK8s cluster.

  • Allocates storage for your DSS Jupyter Notebooks.

  • Deploys an MLflow model registry.

dss initialize --kubeconfig "$(sudo microk8s config)"

The --kubeconfig option is used to provide your MicroK8s cluster’s kubeconfig.

Note

Note the use of quotes for the --kubeconfig option. Without them, the content may be interpreted by your shell.

You should expect an output like this:

Executing initialize command
Storing provided kubeconfig to /home/user/.dss/config
Waiting for deployment mlflow in namespace dss to be ready...
Deployment mlflow in namespace dss is ready
DSS initialized. To create your first notebook run the command:

dss create

Examples:
  dss create my-notebook --image=pytorch
  dss create my-notebook --image=kubeflownotebookswg/jupyter-scipy:v1.8.0

Remove DSS

You can remove DSS from your MicroK8s cluster through dss purge. This command purges all the DSS components, including:

  • All Jupyter Notebooks.

  • The MLflow server.

  • Any data stored within the DSS environment.

Note

This action removes the components of the DSS environment, but it does not remove the DSS CLI or your MicroK8s cluster. To remove those, delete their snaps.

dss purge

Caution

This action is irreversible. All data stored within the DSS environment will be lost.

You should expect an output like this:

Waiting for namespace dss to be deleted...
Success: All DSS components and notebooks purged successfully from the Kubernetes cluster.

Get DSS status

You can check the DSS status through dss status. This command provides a quick way to check the status of your DSS environment, including the MLflow status and whether a GPU is detected in your environment.

dss status

If you already have a DSS environment running and no GPU available, the expected output is:

MLflow deployment: Ready
MLflow URL: http://10.152.183.68:5000
GPU acceleration: Disabled

List DSS commands

You can get the list of available commands for DSS through the dss command with the --help option:

dss --help

You should expect an output like this:

Usage: dss [OPTIONS] COMMAND [ARGS]...

Command line interface for managing the DSS application.

Options:
--help  Show this message and exit.

Commands:
create      Create a Jupyter notebook in DSS and connect it to MLflow.
initialize  Initialize DSS on the given Kubernetes cluster.
list        Lists all created notebooks in the DSS environment.
logs        Prints the logs for the specified notebook or DSS component.
purge       Removes all notebooks and DSS components.
remove      Remove a Jupter Notebook in DSS with the name NAME.
start       Starts a stopped notebook in the DSS environment.
status      Checks the status of key components within the DSS...
stop        Stops a running notebook in the DSS environment.

Get details about a specific command:

To see the usage and options of a DSS command, run dss <command> with the --help option. For example:

dss logs --help

You should expect an output like this:

Usage: dss logs [OPTIONS] [NOTEBOOK_NAME]

Prints the logs for the specified notebook or DSS component.

Examples:
    dss logs my-notebook
    dss logs --mlflow
    dss logs --all

Options:
--kubeconfig TEXT  Path to a Kubernetes config file. Defaults to the value
                    of the KUBECONFIG environment variable, else to
                    './kubeconfig'.
--all              Print the logs for all notebooks and MLflow.
--mlflow           Print the logs for the MLflow deployment.
--help             Show this message and exit.

See also