@@ -27,20 +27,25 @@ or built in advance. We will focus on the custom environment approach here.
## Preparation on the Lecturer's Side
The following part describes several steps for the preparation of a course with the JupyterHub at ZIH.
The following part describes several steps for the preparation of a course with the JupyterHub at
ZIH.
### 1. Creating a custom Python environment ###
### 1. Creating a custom Python environment
Prepare a a Python virtual environment (`virtualenv`) or conda virtual environment as described in [Python virtual environments](../software/python_virtual_environments.md).
Note, for preparing a custom environment for a Jupyter Lab course, all participants will need to have read-access to this environment.
This is best done by storing the environment in either a [workspace](../data_lifecycle/workspaces.md) with a limited lifetime or
in a projects folder (e.g. `/projects/p_lv_jupyter_course/`) without a limited lifetime.
Prepare a a Python virtual environment (`virtualenv`) or conda virtual environment as described in
[Python virtual environments](../software/python_virtual_environments.md). Note, for preparing a
custom environment for a Jupyter Lab course, all participants will need to have read-access to this
environment. This is best done by storing the environment in either a [workspace](../data_lifecycle/workspaces.md)
with a limited lifetime or in a projects folder (e.g. `/projects/p_lv_jupyter_course/`) without a
limited lifetime.
### 2. Clone the repository and store environment setup ###
### 2. Clone the repository and store environment setup
First prepare the `requirements.txt` or the `environment.yml` to persist the environment as described in [Python virtual environments](../software/python_virtual_environments.md).
First prepare the `requirements.txt` or the `environment.yml` to persist the environment as
described in [Python virtual environments](../software/python_virtual_environments.md).
Then clone the repository of your course to your home directory or into a directory in the projects folder and add the file to the repository.
Then clone the repository of your course to your home directory or into a directory in the projects
folder and add the file to the repository.
=== "virtualenv"
```console
...
...
@@ -80,10 +85,10 @@ To test the activation of the environment use:
```
### 3. Prepare an activation file ###
### 3. Prepare an activation file
Create a file to install the `ipykernel` to the user-folder, linking the central `workshop_env` to the ZIH JupyterLab.
An `activate_workshop_env.sh` should have the following content:
Create a file to install the `ipykernel` to the user-folder, linking the central `workshop_env` to
the ZIH JupyterLab. An `activate_workshop_env.sh` should have the following content: