2023-03-27 09:31:02 +02:00
|
|
|
(contributing-packages)=
|
2018-10-29 11:56:52 -07:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
# Environments & Packages
|
2018-10-29 11:56:52 -07:00
|
|
|
|
|
|
|
|
TLJH installs packages from different sources during installation.
|
|
|
|
|
This document describes the various sources and how to upgrade
|
|
|
|
|
versions of packages installed.
|
|
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
## Python Environments
|
2018-10-29 11:56:52 -07:00
|
|
|
|
|
|
|
|
TLJH sets up two python environments during installation.
|
|
|
|
|
|
|
|
|
|
1. **Hub Environment**. JupyterHub, authenticators, spawners, TLJH plugins
|
|
|
|
|
and the TLJH configuration management code is installed into this
|
2023-03-27 09:31:02 +02:00
|
|
|
environment. A [venv](https://docs.python.org/3/library/venv.html) is used,
|
2018-10-29 11:56:52 -07:00
|
|
|
primarily since conda does not support ARM CPUs and we'd like to support the
|
|
|
|
|
RaspberryPI someday. Admins generally do not install custom packages
|
|
|
|
|
in this environment.
|
2023-04-04 21:44:22 +02:00
|
|
|
2. **User Environment**. Jupyter Notebook, JupyterLab, kernels,
|
2018-10-29 11:56:52 -07:00
|
|
|
and packages the users wanna use (such as numpy, scipy, etc) are installed
|
2023-03-27 09:31:02 +02:00
|
|
|
here. A [conda](https://conda.io) environment is used here, since
|
|
|
|
|
a lot of scientific packages are available from Conda. `pip` is still
|
2018-10-29 11:56:52 -07:00
|
|
|
used to install Jupyter specific packages, primarily because most notebook
|
2023-03-27 09:31:02 +02:00
|
|
|
extensions are still available only on [PyPI](https://pypi.org).
|
2018-10-29 11:56:52 -07:00
|
|
|
Admins can install packages here for use by all users.
|
|
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
## Python package versions
|
2018-10-29 11:56:52 -07:00
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
In `installer.py`, most Python packages have a version specified. This
|
2018-10-29 11:56:52 -07:00
|
|
|
can be upgraded freely whenever needed. Some of them have version checks
|
2023-03-27 09:31:02 +02:00
|
|
|
in `integration-tests/test_extensions.py`, so those might need
|
2018-10-29 11:56:52 -07:00
|
|
|
updating too.
|
|
|
|
|
|
2023-03-27 09:31:02 +02:00
|
|
|
## Apt packages
|
2018-10-29 11:56:52 -07:00
|
|
|
|
|
|
|
|
Base operating system packages, including Python itself, are installed
|
2023-03-27 09:31:02 +02:00
|
|
|
via `apt` from the base Ubuntu repositories.
|
2018-10-29 11:56:52 -07:00
|
|
|
|
|
|
|
|
We generally do not pin versions of packages provided by apt, instead
|
2021-10-28 09:43:51 +02:00
|
|
|
just using the latest versions provided by Ubuntu.
|