-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: DSS CLI and Notebook Creation (#115)
* add `docs-lint` tox environment to run docs tests * replace "MLFlow" with "MLflow" in docs * Add docs for dss CLI, notebook creation * Fix how-to/manage-dss section
- Loading branch information
1 parent
273ed1c
commit 5d79362
Showing
20 changed files
with
324 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,26 @@ | ||
DSS | ||
JupyterLab | ||
MLFlow | ||
GPUs | ||
runtime | ||
Initialize | ||
Jupyter | ||
JupyterLab | ||
MLflow | ||
MicroK | ||
microk | ||
OCI | ||
config | ||
hostpath | ||
initialize | ||
initialized | ||
initializing | ||
io | ||
jupyter | ||
kubeconfig | ||
kubeflownotebookswg | ||
microk | ||
microk8s.io | ||
pvc | ||
hostpath | ||
reinitialise | ||
runtime | ||
scipy | ||
snapcraft | ||
toolkits |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Get Status of DSS | ||
================= | ||
|
||
This guide explains how to check the status of your DSS environment. | ||
|
||
Overview | ||
-------- | ||
|
||
The `dss status` command provides a quick way to check the status of your DSS environment, including the status of MLflow and whether a GPU is detected in the environment. | ||
|
||
Installing the DSS Snap | ||
----------------------- | ||
|
||
To see the status of DSS, run the following command: | ||
|
||
.. code-block:: bash | ||
dss status | ||
If you have a DSS environment running and no GPU available, the expected output is: | ||
|
||
.. code-block:: none | ||
[INFO] MLflow deployment: Ready | ||
[INFO] MLflow URL: http://10.152.183.68:5000 | ||
[INFO] GPU acceleration: Disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Manage DSS | ||
========== | ||
|
||
Use these guides for detailed steps on installing and managing the Data Science Stack. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
install-dss-cli | ||
initialize-dss | ||
dss-status | ||
purge-dss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
Initialize DSS | ||
============== | ||
|
||
This guide explains how to initialize the DSS environment through the Data Science Stack (DSS) Command Line Interface (CLI). | ||
|
||
Overview | ||
-------- | ||
|
||
The `dss initialize` command provides a way to initialize the DSS environment. This command: | ||
|
||
* stores credentials for the MicroK8s cluster | ||
* allocates storage for all DSS Notebooks to share | ||
* deploys an `MLflow <MLflow Docs_>`_ model registry | ||
|
||
Prerequisites | ||
------------- | ||
|
||
Before initializing DSS, ensure you have the following: | ||
|
||
- DSS CLI installed on your workstation. | ||
- `MicroK8s`_ installed on your workstation. | ||
|
||
Initializing the DSS Environment | ||
-------------------------------- | ||
|
||
Initialize DSS through the `dss initialize` command, for example: | ||
|
||
.. code-block:: shell | ||
dss initialize --kubeconfig "$(microk8s config)" | ||
where we provide the content of our MicroK8s cluster's kubeconfig using the `--kubeconfig` option. | ||
|
||
.. note:: | ||
Don't forget the quotes around `$(microk8s config)` - without them, the content may be interpreted by your shell. | ||
|
||
The expected output of the above command is: | ||
|
||
.. code-block:: none | ||
[INFO] Executing initialize command | ||
[INFO] Storing provided kubeconfig to /home/user/.dss/config | ||
[INFO] Waiting for deployment mlflow in namespace dss to be ready... | ||
[INFO] Deployment mlflow in namespace dss is ready | ||
[INFO] 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 | ||
From this point, DSS is ready for you to :doc:`create your first notebook </how-to/jupyter-notebook/create-notebook>`. | ||
|
||
Conclusion | ||
---------- | ||
|
||
This guide explained how to initialize the DSS environment through the DSS CLI. You can now proceed to :doc:`create your first notebook </how-to/jupyter-notebook/create-notebook>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Install DSS CLI | ||
=============== | ||
|
||
This guide explains how to install the Data Science Stack (DSS) Command Line Interface (CLI). | ||
|
||
Overview | ||
-------- | ||
|
||
The DSS CLI is distributed as a snap accessible from the `snap store <dss snap store_>`_. | ||
|
||
Prerequisites | ||
------------- | ||
|
||
Before proceeding, ensure that you have the following: | ||
|
||
- A system with `snap`_ installed. | ||
|
||
Installing the DSS Snap | ||
----------------------- | ||
|
||
To install the DSS snap, run the following command: | ||
|
||
.. code-block:: bash | ||
sudo snap install data-science-stack | ||
Then you can run the DSS CLI by running the following command: | ||
|
||
.. code-block:: bash | ||
dss | ||
Conclusion | ||
---------- | ||
|
||
The Data Science Stack CLI has been successfully installed on your system. You can now start using the DSS CLI to manage your data science projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Purge DSS | ||
=========== | ||
|
||
This guide explains how to purge (remove) the Data Science Stack (DSS) environment from your MicroK8s cluster | ||
|
||
Overview | ||
-------- | ||
|
||
The `dss purge` command provides a way to remove everything deployed by DSS from your MicroK8s cluster. This includes all the DSS components, such MLflow and Jupyter Notebooks. | ||
|
||
.. 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, `remove their snaps <https://snapcraft.io/docs/quickstart-tour>`_. | ||
|
||
Prerequisites | ||
------------- | ||
|
||
This guide applies if you have the following: | ||
|
||
- DSS initialized on your system. | ||
|
||
Purging the DSS Environment | ||
--------------------------- | ||
|
||
To purge all DSS components from your machine, do: | ||
|
||
.. code-block:: bash | ||
dss purge | ||
This will remove: | ||
|
||
* all Jupyter Notebooks | ||
* the MLflow server | ||
* any data stored within the DSS environment | ||
|
||
.. caution:: | ||
|
||
This action is irreversible. All data stored within the DSS environment will be lost. | ||
|
||
The expected output from the above command is: | ||
|
||
.. code-block:: none | ||
[INFO] Waiting for namespace dss to be deleted... | ||
[INFO] Success: All DSS components and notebooks purged successfully from the Kubernetes cluster. | ||
Conclusion | ||
---------- | ||
|
||
All elements of the DSS environment have been purged from your MicroK8s cluster. You can now reinitialise DSS on your system if you wish to continue using it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.. _access_ui: | ||
|
||
Access the Jupyter Notebooks UI | ||
=============================== | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,57 @@ | ||
Create Notebook | ||
=============== | ||
|
||
Create Notebook | ||
This guide provides instructions on how to create a Jupyter Notebook in the Data Science Stack (DSS) environment. | ||
|
||
Overview | ||
-------- | ||
|
||
A Jupyter Notebook can be created using the DSS command line interface (CLI). This notebook will include different packages and toolkits depending on the image used to create it. | ||
|
||
Prerequisites | ||
------------- | ||
|
||
Before creating a notebook, ensure you have the following: | ||
|
||
- DSS CLI installed on your workstation | ||
- DSS initialized | ||
|
||
Creating a Notebook | ||
------------------- | ||
|
||
1. **Select an image**: | ||
|
||
Before creating a notebook, you need to select an image that includes the packages and toolkits you need. To see a list of recommended images and their aliases, see: | ||
|
||
.. code-block:: bash | ||
dss create --help | ||
The help text includes a list of recommended images and aliases so you don't need to type the full image name. For this guide, we will use the image `kubeflownotebookswg/jupyter-scipy:v1.8.0` | ||
|
||
2. **Create the notebook**: | ||
|
||
Create a new notebook using ``dss create``: | ||
|
||
.. code-block:: bash | ||
dss create my-notebook --image kubeflownotebookswg/jupyter-scipy:v1.8.0 | ||
This will pull the notebook image and start a Notebook server, printing the URL of the notebook once complete. Expected output: | ||
|
||
.. code-block:: none | ||
[INFO] Executing create command | ||
[INFO] Waiting for deployment test-notebook in namespace dss to be ready... | ||
[INFO] Deployment test-notebook in namespace dss is ready | ||
[INFO] Success: Notebook test-notebook created successfully. | ||
[INFO] Access the notebook at http://10.152.183.42:80. | ||
3. **Access the notebook**: | ||
|
||
To :doc:`access the Notebook </how-to/jupyter-notebook/access-ui>`, use the URL provided in the output. | ||
|
||
Conclusion | ||
---------- | ||
|
||
Notebooks are a powerful tool for data scientists and analysts to explore, visualise, and analyse data. By creating a notebook in the DSS environment, you can leverage the power of the Data Science Stack to run your analyses. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.