According to [1], there are 2 ways. The first method of using session doesn't seem to work on our 10.8 Notebook instance.

!conda install --yes -c esri arcgis
Solving environment: | Killed

In 10.7.1 Notebook instance, you get an installation error.

NameError: name 'get_ipython' is not defined
jupyter nbextension command failed: map widgets in the jupyter notebook may not work, installation continuing...


Step-by-step guide

This works only for 10.7.1 Notebook instance.

  1. Open a new notebook.
  2. Type !conda update -n base -c defaults conda

  3. Type !conda install --yes -c <repo_name> <package_name> to install or upgrade package.


This method will work on ArcGIS Pro and you can run notebook server locally.

References

  1. https://enterprise.arcgis.com/en/notebook/latest/install/linux/extend-a-notebook-runtime.htm