Remember to always Always ALWAYS snapshot the ZFS filesystem home/apps
beneath hn-1:/srv/apps/local
BEFORE ANY OPERATION that will touch Anaconda, in particular, updates. Anaconda is the DEFINITION of dependency hell, and WILL break everyone's workflow if you don't have a means of quick rollback at hand.
Old status
We (Qlustar 12 human users, LB3D pipelines) used an installation of Anaconda 2021.05, presumably installed by Manuel for the Erlangen cluster relaunch in August 2021, with the use of EasyBuild. It has quickly become unmaintainable (by the proverbial sluggishness of conda
, and on top of this, people unwittingly installing stuff via pip
in system mode).
Installation path: /apps/local/software/Anaconda3/2021.05/
, enabled via module load Anaconda3
In slight abuse of the internal naming scheme of Anaconda, the new Python installation as of 2023-06 will be called Anaconda4
.
Installation log, 2023-06-02 (Anaconda 2023.03, Python 3.10.13)
All as normal user:
Download
Anaconda3-2023.03-1-Linux-x86_64.sh
(861
MB) from their website
Install into /apps/local/software/Anaconda3/2023.03/
, skip conda init
Adapt /apps/local/modules/all/Anaconda3/2021.05.lua
to /apps/local/modules/all/Anaconda4/2023.03.lua
(bump version, strip EasyBuild internals)
Add conda-forge to the default package list: conda config --append channels conda-forge
Contrary to mamba documentation, the conda-forge
channel is already enabled by default.
Install mamba
: module load Anaconda4 ; conda install mamba -n base -c conda-forge
(on sun-60: takes 4m32.552s, most of it for calculating dependencies)
Updates! mamba update --all
Install custom packages: gmsh vtk
(important to be installed first), then ford f90nml jupyterhub{,-base} jupyter-server-proxy cython
TODO jupyterlab-slurm???
…
More to follow upon user request. First one:
wordcloud
Another round of updates: mamba update --all
Compare conda list
output between installations to spot manually installed packages: vimdiff <(cat $previous_conda_list | awk '{ print $1 }' | sort) <(conda list | awk '{ print $1 }' | sort)
Remove packages that are unnecessary and/or interfere with other stuff in the toolchain: mpi mpich
Write an e-mail to everyone that they should test Anaconda4
and report if things are missing or misbehaving.
Remove write privileges to everyday users (make it harder for myself to mess up the installation).
I have
chown -R softadm /apps/local/software/Anaconda4
’d the installation, but thanks to a 002-ish umask, users that are members of the
softadm
group (like JH7r) are still not write-protected.
Upgrade shared Jupyter notebook to Anaconda4, 2023-11-10
Minimum-invasive forward-port of Jupyter Hub from MZ (including his semi-successful Slurm queue efforts). Config files copied over, $PATH
adapted.
Get the Jupyter Lab running:
mamba install batchspawner "nodejs=12*" configurable-http-proxy %%--%%channel conda-forge
jupyter lab build # Pointer from <https://stackoverflow.com/a/60606367>. Takes a few minutes to finish.
Then stop the jupyterhub.service
on login, re-wire the systemd service file, start the new server, and test it (import sys; print(sys.executable)
).
Finally, replace the Anaconda3
module by a symlink to the Anaconda4
module.
Run module load Anaconda4
to equip your local shell with all the Python goodness.
Post-installation routine:
Installations and updates interim/post-setup
When trying to install numba
, mamba got trapped into dependency hell. Applying updates only made things worse.
Reinstall Anaconda, 2023.09 flavour (Python 3.11.5)
Download
Anaconda3-2023.09-0-Linux-x86_64.sh
(1.1
GB)
Install into /apps/local/software/Anaconda3/2023.09/
(don't create the directory beforehand!), skip conda init
Set up /apps/local/modules/all/Anaconda4/2023.09.lua
; set up a symlink ln -s 2023.03.lua default
to avoid accidental loading while in internal beta. Load the module.
Snapshot the ZFS filesystem zfs snapshot home/apps@anaconda2023.09vanilla
Updates (conda level): time conda update –all
, takes 2m1.668s
conda config --show channels
shows us that conda-forge
is already in there, so we don't need to enable it.
time conda install mamba
, takes 1m34.330s, but leaves mamba in an unusable state (
argument COMMAND: conflicting subparser: repoquery
; this seems to be known upstream, and a
fix is on the way)
The current situation is broken. We cannot use mamba
on fresh installations, so we are left with using conda
on either the old or the new Anaconda4. (Needless to say that this comes with the expected drawbacks like absurd performance, killing conda install numba
after 23 minutes of miserable attempts to resolve dependencies.)
For the bold future:
mamba install gmsh vtk
mamba install ford f90nml jupyterhub{,-base,-server-proxy} cython wordcloud trimesh lcov qiskit --channel conda-forge
→ Not ready for deployment, the `Anaconda4` module will stay on 2023.03 for the time being.
https://sun.hi-ern.de/teach/
As of 2023-11, still using legacy Anaconda3 (including its weird Julia bindings) to not break user interface during the semester.
…are not officially supported. You're on your own.