mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Merge pull request #658 from jtpio/jupyterlab-3.0
This commit is contained in:
@@ -40,9 +40,7 @@ Apt packages
|
||||
============
|
||||
|
||||
Base operating system packages, including Python itself, are installed
|
||||
via ``apt`` from the base Ubuntu repositories. The one exception to this
|
||||
is nodejs, which is installed from the `nodesource <https://github.com/nodesource/distributions>`_
|
||||
apt repository. The Ubuntu provided version of nodejs is usually too old.
|
||||
via ``apt`` from the base Ubuntu repositories.
|
||||
|
||||
We generally do not pin versions of packages provided by apt, instead
|
||||
just using the latest versions provided by Ubuntu.
|
||||
@@ -4,7 +4,7 @@
|
||||
Check your memory usage
|
||||
=======================
|
||||
|
||||
The `nbresuse <https://github.com/yuvipanda/nbresuse>`_ extension is part of
|
||||
The `jupyter-resource-usage <https://github.com/jupyter-server/jupyter-resource-usage>`_ extension is part of
|
||||
the default installation, and tells you how much memory your user is using
|
||||
right now, and what the memory limit for your user is. It is shown in the
|
||||
top right corner of the notebook interface. Note that this is memory usage
|
||||
@@ -12,4 +12,4 @@ for everything your user is running through the Jupyter notebook interface,
|
||||
not just the specific notebook it is shown on.
|
||||
|
||||
.. image:: ../../images/nbresuse.png
|
||||
:alt: Memory limit / usage shown with nbresuse
|
||||
:alt: Memory limit / usage shown with jupyter-resource-usage
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
.. _howto/admin/resize:
|
||||
|
||||
=================================================
|
||||
Resize the resources available to your JupyterHub
|
||||
Resize the resources available to your JupyterHub
|
||||
=================================================
|
||||
|
||||
As you are using your JupyterHub, you may need to increase or decrease
|
||||
As you are using your JupyterHub, you may need to increase or decrease
|
||||
the amount of resources allocated to your TLJH install. The kinds of resources that can be
|
||||
allocated, as well as the process to do so, will depend on the provider / interface for your
|
||||
VM. We recommend consulting the installation page for your provider for more information. This
|
||||
@@ -18,12 +18,12 @@ Currently there are instructions to resize your resources on the following provi
|
||||
Once resources have been reallocated, you must tell TLJH to make use of these resources,
|
||||
and verify that the resources have become available.
|
||||
|
||||
Verifying a Resize
|
||||
Verifying a Resize
|
||||
==================
|
||||
|
||||
#. Once you have resized your server, tell the JupyterHub to make use of
|
||||
these new resources. To accomplish this, follow the instructions in
|
||||
:ref:`topic/tljh-config` to set new memory or CPU limits and reload the hub. This can be completed
|
||||
#. Once you have resized your server, tell the JupyterHub to make use of
|
||||
these new resources. To accomplish this, follow the instructions in
|
||||
:ref:`topic/tljh-config` to set new memory or CPU limits and reload the hub. This can be completed
|
||||
using the terminal in the JupyterHub (or via SSH-ing into your VM and using this terminal).
|
||||
|
||||
#. TLJH configuration options can be verified by viewing the tljh-config output.
|
||||
@@ -36,14 +36,14 @@ Verifying a Resize
|
||||
|
||||
#. **To verify changes to memory**, confirm that it worked by starting
|
||||
a new server (if you had one previously running, click "Control Panel -> Stop My Server" to
|
||||
shut down your active server first), opening a notebook, and checking the value of the
|
||||
`nbresuse <https://github.com/yuvipanda/nbresuse>`_ extension in the upper-right.
|
||||
shut down your active server first), opening a notebook, and checking the value of the
|
||||
`jupyter-resource-usage <https://github.com/jupyter-server/jupyter-resource-usage>`_ extension in the upper-right.
|
||||
|
||||
.. image:: ../../images/nbresuse.png
|
||||
:alt: nbresuse demonstration
|
||||
:alt: jupyter-resource-usage demonstration
|
||||
|
||||
#. **To verify changes to CPU**, use the ``nproc`` from a terminal.
|
||||
This command displays the number of available cores, and should be equal to the
|
||||
#. **To verify changes to CPU**, use the ``nproc`` from a terminal.
|
||||
This command displays the number of available cores, and should be equal to the
|
||||
number of cores you selected in your provider's interface.
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
@@ -62,10 +62,10 @@ stop, unlike with RAM.
|
||||
|
||||
Recommended\, CPU = (Max\, concurrent\, users \times Max\, CPU\, usage\, per\, user) + 20\%
|
||||
|
||||
The ``20%`` is overhead for TLJH and related services. This is around 20% of a
|
||||
The ``20%`` is overhead for TLJH and related services. This is around 20% of a
|
||||
single modern CPU. This, of course, is just an estimate. We recommend using
|
||||
the same process used to estimate Memory required for estimating CPU required.
|
||||
You cannot use nbresuse for this, but you should carry out normal workflow and
|
||||
You cannot use jupyter-resource-usage for this, but you should carry out normal workflow and
|
||||
investigate the CPU usage on the machine.
|
||||
|
||||
Disk space
|
||||
|
||||
@@ -4,21 +4,19 @@
|
||||
What does the installer do?
|
||||
===========================
|
||||
|
||||
This document details what exactly the installer does to the machine it is
|
||||
This document details what exactly the installer does to the machine it is
|
||||
run on.
|
||||
|
||||
``apt`` Packages installed
|
||||
==========================
|
||||
|
||||
The packages ``python3`` and ``python3-venv`` are installed from the apt repositories.
|
||||
Since we need an recent & supported version of ``nodejs``, we install it from
|
||||
`nodesource <https://github.com/nodesource/distributions>`_.
|
||||
|
||||
Hub environment
|
||||
===============
|
||||
|
||||
JupyterHub is run from a python3 virtual environment located in ``/opt/tljh/hub``. It
|
||||
uses the system's installed python and is owned by root. It also contains a binary install
|
||||
uses the system's installed python and is owned by root. It also contains a binary install
|
||||
of `traefik <http://traefik.io/>`_. This virtual environment is completely managed by TLJH.
|
||||
|
||||
.. note::
|
||||
@@ -34,7 +32,7 @@ User environment
|
||||
|
||||
By default, a ``miniconda`` environment is installed in ``/opt/tljh/user``. This contains
|
||||
the notebook interface used to launch all users, and the various packages available to all
|
||||
users. The environment is owned by the ``root`` user. JupyterHub admins may use
|
||||
users. The environment is owned by the ``root`` user. JupyterHub admins may use
|
||||
to ``sudo -E conda install`` or ``sudo -E pip install`` packages into this environment.
|
||||
|
||||
This conda environment is added to ``$PATH`` for all users started with JupyterHub. If you
|
||||
@@ -49,7 +47,7 @@ This should let you run various ``conda`` and ``pip`` commands. If you run into
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo env PATH=${PATH} <command>
|
||||
sudo env PATH=${PATH} <command>
|
||||
|
||||
By default, ``sudo`` does not respect any custom environments you have activated. The ``env PATH=${PATH}``
|
||||
'fixes' that.
|
||||
|
||||
Reference in New Issue
Block a user