This repository is used for the development and distribution of exercises for BSc Informatik - bveri HS 2023
There are several ways to work on the assignments:
- Google Colab (easiest)
- local - pip install (not tested)
- Jupyter-Hub (easy but no GPU)
- local - Docker
Use Google Colab by clicking on the links below.
Click on the following badge to open the notebook in Google Colab:
Click on the following badge to open the notebook in Google Colab:
Click on the following badge to open the notebook in Google Colab:
Click on the following badge to open the notebook in Google Colab:
Click on the following badge to open the notebook in Google Colab:
Click on the following badge to open the notebook in Google Colab:
Click on the following badge to open the notebook in Google Colab:
pip install -r requirements.txt
We provide you with the online platform JHub at
https://jhub2.cs.technik.fhnw.ch. Use the image sgi_bveri_hs2023
.
(Please be aware that on JHub only files that are in /home/jovyan/work/persistent/
are safe from being deleted, when your server is being restarted, which can also occur due to maintenance reasons.)
If you want to use this option, proceed as follows:
Fork this repository to your own user space by pressing the fork button on the upper right.
In your fork on GitLab find the https-address (MY_REPO_FORK_HTTPS_ADDRESS
), with which you can clone your Repo.
Open a terminal window in JupyterLab, cd
into /home/jovyan/work/persistent
and clone your fork with:
$ git clone MY_REPO_FORK_HTTPS_ADDRESS
Tipp: You can use an access API token to avoid having to type your username and password, as well as confirming logins with 2FA.
To use an API token, on GitLab in your fork of the repository:
"Settings->Access Tokens"
- Enter a name for your access token
- Select an expiration date well after this course ends
- Select the maintainer role
- Select "api" under scopes
- Create token and save it (
MY_ACCESS_TOKEN
) - Find the address of your repo without the https prefix (
MY_REPO_FORK_ADDRESS_NO_HTTPS
)
Then you can clone the repository with the following command:
git clone https://api:MY_ACCESS_TOKEN@MY_REPO_FORK_ADDRESS_NO_HTTPS
example:
git clone https://api:[email protected]/marco.willi/bveri-exercises-hs2023
You might also have to set your user name and email once (replace accordingly):
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
To fetch new assignments from the main repo do as follows:
# add original repo as remote upstream
$ git remote add upstream https://gitlab.fhnw.ch/ml/courses/bveri/hs2023/bveri-exercises-hs2023
# now whenever you want to merge the changes from the remote upstream repo,
# ie the one you forked from, you can do:
$ git pull upstream main
.. and add some merge message in case you have to merge.
Depending on your operating system you have to install docker in different ways.
You'll find detailed instructions here: https://docs.docker.com/get-docker
You can pull the image with an API token that allows for reading the container registry:
# login to the FHNW GitLab docker registry first
$ docker login cr.gitlab.fhnw.ch -u <username> -p -tr6TtDDnCuoaJWtvbYz
# now pull the image
$ docker pull cr.gitlab.fhnw.ch/ml/courses/bveri/hs2023/bveri-exercises-hs2023:latest
Fork this repository to your own user space by pressing the fork button on the upper right.
For this you might wanna set up a ssh-key for your computer, see here: https://docs.gitlab.com/ee/ssh/ . Otherwise you can also proceed with https.
In your fork on GitLab find the address (MY_REPO_FORK_ADDRESS
) with which you can clone your Repo.
Clone into your ml directory (MY_ML_DIR
) using:
$ git clone MY_REPO_FORK_HTTPS_ADDRESS
Tipp: You can use an access API token to avoid having to type your username and password, as well as confirming logins with 2FA.
To use an API token, on GitLab in your fork of the repository:
"Settings->Access Tokens"
- Enter a name for your access token
- Select an expiration date well after this course ends
- Select the maintainer role
- Select "api" under scopes
- Create token and save it (
MY_ACCESS_TOKEN
) - Find the address of your repo without the https prefix (
MY_REPO_FORK_ADDRESS_NO_HTTPS
)
Then you can clone the repository with the following command:
git clone https://api:MY_ACCESS_TOKEN@MY_REPO_FORK_ADDRESS_NO_HTTPS
example:
git clone https://api:[email protected]/marco.willi/bveri-exercises-hs2023
# Replace 'MY_ML_DIR' with your local code directory
$ docker run -d \
-p 8877:8888 \
--user root \
-v MY_ML_DIR:/home/jovyan/work/ \
--name=bveri_hs2023 \
cr.gitlab.fhnw.ch/ml/courses/bveri/hs2023/bveri-exercises-hs2023:latest start.sh jupyter lab --LabApp.token=''
$ docker ps -a
Enter http://localhost:8877/lab
in your browser.
If you later on need to restart your container you can just run
$ docker start bveri_hs2023
To fetch new assignments from the main repo do as follows:
# add original repo as remote upstream
$ git remote add upstream [email protected]:ml/courses/bveri/hs2023/bveri-exercises-hs2023.git
# now whenever you want to merge the changes from the remote upstream repo, ie
the one you forked from, you can do:
$ git pull upstream
.. and add some merge message in case you have to merge.