Build Part 2: User dsci#
Already done: installation of the basic system, see Build Part 1: user install.
This section: user defined software and configurations.
The user dscidsci deliberately is not part of the sudo group. In order to install some software you need to know the password of the user install.
customize background image#
copy your user definded background image into /usr/share/xfce4/backdrops/
select image in Whisker-Menue > Settings > LightDM GTK+ Greeter
enter install password
select background image
(Mini-)Conda#
https://docs.conda.io/projects/conda/en/stable/user-guide/install/linux.html
Miniconda Installer: https://docs.conda.io/projects/miniconda/en/latest/ > Quick command line install:
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
==> For changes to take effect, close and re-open your current shell. <==
Why close and open? In an earlier step you have installed conda
. Conda puts an extra virtual environment layer over the standard Python installation, so we can work with multiple Python configurations in parallel. To learn more about virtual environments:
https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-conda.html
https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
Your termial command line now should start with (base)
, which is the name of your current virtual environment:
(base) dsci@dsci-lab-ss24:~$
Keep conda
current:
conda update --all
(Note:Instead of installing miniconda you instead want to install anaconda
(https://www.anaconda.com/products/individual). Anaconda is much more complete than miniconda, but IMHO fo “fat”. In our dsci-lab we prefer a lightweight system. This allows you to look more easily “under the hood”, to understand what’s going on, and to maintain the whole system - the dependencies in our setup are complex enough anyhow.)
Install python packages into the virtual conda environment base
#
As said: Conda is minimalistic. Tus we have to install some modules by ourselfes.
Some important ones are:
pip install pandas numpy matplotlib scikit-learn seaborn rdflib owlrl markdownify lxml markdown python-slugify jupyter-book jupytext
Notes:
We do install these packages into the virtual conda environment
base
. If we decide to create another virtual conda environment, it will be empty again, and we have to populate it with libraries again. This is the reason (a) why we prefer lightweight environments, and (b) why we want to learn how to install libraries by ourselfes.Caveat: Install Conda not with sudo, but instead with the role of a normal user. Every user and every virtual conda environment are completely independent from each other. There is no system-wide installation.
Jupyterbook#
Test the jupyterbook installation: Build the book according to https://jupyterbook.org/start/build.html
mkdir -p ~/c
cd ~/c
jb create jupyterbook-test
build html:
jb build test
firefox test/_build/html/index.html &
build pdf via LaTeX:
jb build test --builder pdflatex
atril test/_build/latex/book.pdf &
vscode#
As of 2024 we recommend Microsoft Visual Studio Code (aka VS Code) https://code.visualstudio.com/docs/python/python-tutorial:
snap install code --classic
spaCy (not used in 2024)#
Linux, X86, conda, CPU
NO virtual env
Trained pipelines: English, German
conda install -c conda-forge spacy
python -m spacy download en_core_web_sm
python -m spacy download de_core_news_sm
PyCharm (not used in 2024)#
Warning: PyCharm is HUGE, we do not use it. (Rather try Visual Studio Code). However, if you want to play with PyCharm:
https://www.jetbrains.com/help/pycharm/installation-guide.html:
RAM: 4 GB (min), 8 GB (recommended)
Disk space: 2.5 GB and another 1 GB for caches (min), SSD drive with at least 5 GB of free space (recommended)
how to install: Standalone installation > Linux > Install using snap packages > Community Edition (same as https://snapcraft.io/install/pycharm-community/ubuntu)
sudo snap install pycharm-community --classic
get started with PyCharm: https://www.jetbrains.com/help/pycharm/quick-start-guide.html
Run pycharm-community
in the Terminal.
TBD: initially configure PyCharm
point to our conda virtual environment, including python 3.9 interpreter
Zotero#
siehe r_zotero
mystmd#
Install and init mystmd
according to https://mystmd.org/guide/quickstart:
conda install -c conda-forge 'nodejs>=20,<21'
conda install mystmd -c conda-forge
git clone https://github.com/executablebooks/mystmd-quickstart.git
cd mystmd-quickstart
myst init
Some frequently useful commands:
Start local server:
myst start
Build static html: https://mystmd.org/guide/deployment#creating-static-html:
myst build --html
Build pdf via LaTeX (and yes, LaTeX is already installed to work with myst): https://mystmd.org/guide/creating-pdf-documents#exporting-to-pdf
myst build my-document.md --pdf