- Log into Ondemand on Ubelix.
- Create a new session with
- GPU-Type - RTX 4090
- Time - 2 hours
- Instance - small or medium.
- Cuda - 12.8
- Mode - Jupyter Lab.
- Account :
teaching - wckey: Leave it blank
- Partition:
teaching (GPU) - Select the Advanced mode checkbox
- Reservation =
CAS_NLP_4
- Reservation =
- Select the email on start and give your email.
- Submit.
- Once the session has started, open it.
- On the terminal, fork the github repository with
git clone https://github.com/dsl-unibe-ch/CAS_NLP_M4.git - Change into the directory with
cd CAS_NLP_M4 - Load Anaconda
module load Anaconda3 - Create a virtual environment with
python -m venv .venv - Initialise conda
eval "$(conda shell.bash hook)" - Add conda source
conda config --add channels conda-forgeconda config --set channel_priority strict
- Create venv
conda create --name myenv - Conda activate environment
conda activate myenv - Install pip requirements with
pip install -r requirements.txt - Create kernel
python -m ipykernel install --user --name conda_kernel - Set the kernel to this new conda environment
conda_kernelon the notebook. - Create an account on Huggingface and create an access token. Make a
.envfile by copying the contents of.env.example. Inside.envfile, assign the access token to the variableHF_TOKEN.
- Perform the steps 1, 2, 4, 5, 10 from First Time Steps.
- Pull latest github repo updates with
git pull. In case of conflicts, resolve them. - Perform the steps 13 from First Time Steps.
In case of conflicts, you may create a new conda env and kernel again.
conda create -n llm-cu128 python=3.11 -yconda activate llm-cu128python -m pip install -U pippython -m pip install -r requirements.txtpython -m ipykernel install --user --name llm-cu128 --display-name "Python (llm-cu128)"