Skip to content
Snippets Groups Projects
Commit 153a6cef authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

fixes img path

parent b6744449
Branches
Tags
No related merge requests found
Showing
with 188 additions and 59 deletions
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// for podman as rootless
"runArgs": ["--userns=keep-id"],
"remoteUser": "vscode",
"containerUser": "vscode"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
"features": {
"ghcr.io/devcontainers-contrib/features/mkdocs:2": {}
}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9"
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"containerUser": "vscode"
}
# Git Tipps and Tools
There is a lot of ways how to use git and sometimes a working solution can be very helpful for everybody. So please share you experience and working solutions.
[[_TOC_]]
## HowTo add a specif ssh-key for your git account
Sometimes it might be useful to have different ssh-keys per project or have a special ssh-key just for github/gitlab.
......
......@@ -155,11 +155,11 @@ Steps:
- Choose a job
- The jupyterlab will be launched and will be available to you until you log out or the wall time exceeds.
<img src="/mkdocs/img/jet-login.png" width="500px">
<img src="./mkdocs/img/jet-login.png" width="500px">
<img src="/mkdocs/img/jet-job1.png" width="500px">
<img src="./mkdocs/img/jet-job1.png" width="500px">
<img src="/mkdocs/img/jet-job2.png" width="500px">
<img src="./mkdocs/img/jet-job2.png" width="500px">
There are several kernels available and some help can be found:
......
......@@ -11,8 +11,7 @@ What you need to get started:
* other [Examples](https://www.latextemplates.com)
* More [Overleaf-Examples](https://de.overleaf.com/latex/examples)
[Advanced Guide to writing scientific papers with $`\LaTeX`$ (Wissenschaftliche Arbeiten schreiben mit $`\LaTeX`$
)](Wissenschaftliches-Script-Latex-Seibert-05.2021.pdf) or the [latest](https://homepage.univie.ac.at/petra.seibert/files/latexscript.pdf)
[Advanced Guide to writing scientific papers with $`\LaTeX`$ (Wissenschaftliche Arbeiten schreiben mit $`\LaTeX`$ )](Wissenschaftliches-Script-Latex-Seibert-05.2021.pdf) or the [latest](https://homepage.univie.ac.at/petra.seibert/files/latexscript.pdf)
# What to use?
......
# Miscellaneous Topics
[[_TOC_]]
## Customize your shell
On a Linux system there are numerous ways of customizing user experience. And of course there is a way to customize the shell. It should be common by now, that people use [BASH](https://de.wikipedia.org/wiki/Bash_(Shell)), if not run `chsh -s /bin/bash` in your terminal and if you are not sure run `echo $SHELL` wich should show bash.
......
......@@ -3,7 +3,9 @@
in Linux it is quite common to have virtual terminals or mulitplexer, which allows to have multiple terminal sessions in one window. This is similar to the `nohup` command which does not send a "hangup" (SIGHUP) signal, therefore continues to run. Running a VNC-Session is similar but is used for graphical applications mainly.
There are especially [**tmux**](https://en.wikipedia.org/wiki/Tmux) and [**screen**](https://en.wikipedia.org/wiki/GNU_Screen) that are widely used on HPC or servers.
![tmux](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Tmux_logo.svg/365px-Tmux_logo.svg.png)
![screen](https://upload.wikimedia.org/wikipedia/commons/thumb/b/b5/Gnuscreen.png/450px-Gnuscreen.png)
Although tmux and screen work similarly, it shall be noted that tmux os prefered.
......
# Python related Problems
[[_TOC_]]
## Introduction to conda / micromamba
......@@ -67,7 +66,6 @@ Some are:
- Jupyter Notebooks and Lab e.g. on `Jupyterhub@srvx1` or `jupyterhub@jet`
and `atom`. This is simple editor available on any platform and it can be extended with packages to become a full grown IDE with the power of open source.
[Atom-IDE-Install](QA-006-Atom-IDE.md)
## Q: How to add a new package to anaconda module?
......
......@@ -55,7 +55,7 @@ Major Libraries:
These software libraries are usually handled by environment modules.
![](/mkdocs/img/envmodules.png)
![](./mkdocs/img/envmodules.png)
## Currently installed modules
......
......@@ -53,7 +53,7 @@ ssh-agent -k
[Nice summary of how an ssh-agent works](https://smallstep.com/blog/ssh-agent-explained/)
<img src="https://keepassxc.org/images/keepassxc-logo.svg" height="200px">
<img src="https://keepassxc.org/images/keepassxc-logo.svg" width="200px">
Keep in mind that you can use the ssh-agent with [KeepassXC](https://keepassxc.org/docs/#faq-ssh-agent-how), find a nice tutorial [here](https://ferrario.me/using-keepassxc-to-manage-ssh-keys/). This is really convenient as it allows you to use all keys in the Keepass as long as it is unlocked. The keys will be automatically removed when the keepass is locked. :)
......
......@@ -36,7 +36,7 @@ You can detach from this session with `CTRL + A D` and reconnect again with `scr
Multiple Sessions can be created and the output saved (`-L` Option).
![](/mkdocs/img/screen-cheatsheet.png)
![](../mkdocs/img/screen-cheatsheet.png)
## Tmux
[Tmux](https://wiki.ubuntuusers.de/tmux/) is a terminal multiplexer, that allows to open more consoles and allows to detach the session. It is much more complex and powerful compared to screen.
......
......@@ -62,6 +62,14 @@ and replacing `[USERNAME]` and `[U:Account USERNAME]` with your usernames. Using
Please note the special algorithms for ecaccess.
**From eduroam**: You should be able to log in as above.
**From the outer world**: First connect to the [UniVie VPN](https://zid.univie.ac.at/en/vpn/), then start up a terminal and log in as above. Consider using [connect2vpn](connect2vpn) script to do so. Set your U:Account username as environmental variable `$VPN_USER` and run `connect2vpn`, select split (only adresses within the UNINET) or full (all connections) tunnel and watch the connection information update every 10 seconds.
If you are a guest, you can apply for a [guest u:account](https://zid.univie.ac.at/uaccount/#c11096). This will give you access to eduroam and to the VPN. Your application needs to be endorsed by a staff member, who also determines the expiration date of the account.
## SSH Authentication with keys
If you want to use ssh-keys you can also use different keys in `.ssh/config` per server with `IdentityFile ~/.ssh/id_rsa_for_server`.
**Note: If you are having trouble with your ssh-key being accepted. You need to check the selinux security policy. Because we use non standard home directories, which are not accepted by default.** Do that by running:
......@@ -74,13 +82,7 @@ ls -lZ ~/.ssh/
```
If you are not seeing `ssh_home_t` than you need to run `restorecon -Rv ~/.ssh/` which should update the security policy and allow for the SSH-Daemon to accept your keys.
**From eduroam**: You should be able to log in as above.
**From the outer world**: First connect to the [UniVie VPN](https://zid.univie.ac.at/en/vpn/), then start up a terminal and log in as above. Consider using [connect2vpn](connect2vpn) script to do so. Set your U:Account username as environmental variable `$VPN_USER` and run `connect2vpn`, select split (only adresses within the UNINET) or full (all connections) tunnel and watch the connection information update every 10 seconds.
If you are a guest, you can apply for a [guest u:account](https://zid.univie.ac.at/uaccount/#c11096). This will give you access to eduroam and to the VPN. Your application needs to be endorsed by a staff member, who also determines the expiration date of the account.
## SSH Authentication with keys
**Please add your ssh-keys via [IPA](IPA.md#add-ssh-key)**
Find a solution [Questions - How to use ssh-key authentication?](Questions.md#q-how-to-use-ssh-key-authentication) or [Questions - How to use an ssh-agent?](Questions.md#q-how-to-use-an-ssh-agent)
......
# Teaching Hub
<img src="/mkdocs/img/jupyterhub-logo.svg" width="100px">
<img src="./mkdocs/img/jupyterhub-logo.svg" width="100px">
## Getting Started
Address: [https://srvx1.img.univie.ac.at/hub](https://srvx1.img.univie.ac.at/hub)
......@@ -37,22 +37,22 @@ As stated in the email you received, you need to download one of these TOTP apps
I recommend using your phone and an app there, as this is the most secure way. And with you phone you can scan the qr code, which looks like this:
<img src="/mkdocs/img/teachinghub-qrcode.png" width="300px">
<img src="./mkdocs/img/teachinghub-qrcode.png" width="300px">
When you scan to your Authenticator App, it will automatically get the details (username, Secret) required to generate every 30 seconds a Time-based One Time Password (TOTP). Like this:
![](/mkdocs/img/teachinghub-authenticator.png)
![](./mkdocs/img/teachinghub-authenticator.png)
If you want to use a desktop or other app that might not scan QR codes, you can fill in the details manually like this:
- Provider: `TeachingHub`
- Account: `[user]` your username, here `monkey`
- Token or Secret or Hash: `1A2B3C4D5E6F7G8H` is the secret from your email.
![](/mkdocs/img/teachinghub-authenticator-manual.png)
![](./mkdocs/img/teachinghub-authenticator-manual.png)
The combination of username, password and TOTP needs to be used to sign in:
![](/mkdocs/img/teachinghublogin.png)
![](./mkdocs/img/teachinghublogin.png)
This sounds all really complicated, but I promise this will be easier from time to time. Don't forget that this for our all security and your contribution is appreciated! Thanks.
......@@ -67,13 +67,13 @@ Now you are ready to go to the teaching hub and sign in:
Currently there are several Notebooks with different Kernels (Python kernels) installed at SRVX1. Look at the logos, if SRVX1 is in there then you will have access to these notebooks and kernels. If SRVX2 or SRVX8 are in the logo you might not have access as this is for researchers.
![](/mkdocs/img/teachinghubnotebooks.png)
![](./mkdocs/img/teachinghubnotebooks.png)
As you can see it is also possible to launch a terminal inside the TeachingHub and you will find you files from your home directory there.
It might be that your course has a separate Notebook/Kernel for you, with installed packages and dependencies required for this specific course. However, these Notebooks/Kernels are only available during these lectures and might be removed in the future. So be aware of that. Note that you can easily change a kernel in your notebook. So no need to delete, copy or do anything. Your data/notebook information is safe.
![](/mkdocs/img/teachinghubnotebooks_kernels.png)
![](./mkdocs/img/teachinghubnotebooks_kernels.png)
......
#!/bin/bash
# By MB
# Build a mkdocs Documentation from existing Documentation
# requires jupyter-nbconvert
DOCS="./docs"
# Go through all directories creating a similar structure in docs.
# Add tags to Markdown files
#---
#tags:
# - Python
# - JET
#---
# Build pages
mkdocs build
# Copy to the correct location
\ No newline at end of file
#!/bin/bash
# By MB
# Deploy documentation to web root
if [ $EUID -ne 0 ]; then
echo "Run as root"
exit 1
fi
echo "Deploying to /var/www/html/docs"
mkdir -p /var/www/html/docs
mkdocs build -d /var/www/html/docs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment