Dependencies for the IP4RS course.
The repository uses micromamba
under the hood and provides some automations via a justfile
(see just documentation for more information).
Previously, a Docker Image
was used as the single source of truth,
but we are moving away from it as it provides little benefit over the
direct installation via micromamba
. micromamba
should be prefered if possible and will be used
as the baseline to evaluate the homeworks.
Windows users are recommended to install micromamba
directly via
the Windows Subsystem for Linux (WSL) due
to missing support of Windows libraries for some dependencies.
- Install just
- Move to the dependency directory and run
just install_env_<PLATFORM>
- Wait for the command to finish; might take up to 10min for downloading & unpacking
- Start
jupyter lab
(just jupyter
) and select theip4rs
kernel
If you need a GPU, you have to select the GPU instance before proceeding! Note that you may not get access to a GPU instance as it is a free service.
To reproduce our environment on Google Colab as closely as possible, we rely on condacolab to install our conda dependencies:
Add these cells to the top of the notebook:
!pip install -q condacolab
import condacolab
condacolab.install()
colab "crashes" and restarts; this is expected. Now we can install our dependencies as follows:
import condacolab
condacolab.check()
!curl https://raw.githubusercontent.com/kai-tub/ip4rs-dependencies/main/conda-linux-64.lock.yml >> lock.yml
!mamba env update -n base -f lock.yml
It will take ~7min to complete and after that you can start programming!
A few notes about common issues that we have seen before:
- Unhelpful error messages during installation about permission issues
- Potentially full disk, ensure that at least 20GB of free storage is available
- Cannot access
juypter lab
with given URL (404 not found)- Check that the correct
port
is used (especially when usingdocker
with-p
option) - If running WSL: Remote
localhost
in URL with0.0.0.0
in browser
- Check that the correct
- Google Colab not showing
tqdm
progress or anystderr
- No solution exists as Google Colab doesn't show
stderr
and due to this issue the defaulttqdm
output doesn't work either
- No solution exists as Google Colab doesn't show
- Google Colab not showing
tqdm.notebook
output- In the default environment Google Colab works, but when installing the environment
via the conda-hack, there are issues with the Javascript/Front-end rendering engine; use
use
tqdm.rich
instead
- In the default environment Google Colab works, but when installing the environment
via the conda-hack, there are issues with the Javascript/Front-end rendering engine; use
use
- Add the new libraries to the environment.yml file and run
just update_locks
It may happen that a (transitive) dependency is pulled from conda-forge
(or any other conda channel) during the semester.
To fix it, simply update/regenerate the lock files!
The base environment.yml
file is not that restrictive and it should be easy
to fix the issue by checking other available options during the resolve phase.
Either way, after installing different library version, all source notebooks have to be re-evaluated!