https://indico.cern.ch/event/1376644/
Some dependencies are rather hard to install for this workflow. The requirements.txt was tested with python 3.9 to 3.12.
- clone this repo:
git clone https://github.com/psteinb/2024-intro2ml-cern-school-of-computing csc24-ml - change into the repo root folder:
cd csc24-ml - create a
venvbypython -m venv py311 --upgrade-deps(e.g. for python3.11) - setup that
venvby doingsource py311/bin/activate - (optional) install
uvfor faster installations (see uv docs) - either do
uv pip install -r ./requirements.txtor plainpython -m pip install -r ./requirements.txt
If you like to train cpu-only, you can install torch without CUDA support. This is best beformed between step 2 and 4 in the recipe above by running:
uv pip install --extra-index-url https://download.pytorch.org/whl/cpu torchor without uv:
python -m pip install --extra-index-url https://download.pytorch.org/whl/cpu torchIf you want to use the CERN SWAN system, here is a brief intro on how to do it:
-
open https://swan.cern.ch (provide your credentials if required)
-
you should be queried for the software environment to setup (if not use
...in the top menue and clickChange configuration)
- Under
My Projects, click onDownload Project from git(right hand side)
- insert the URL to this repo
https://github.com/psteinb/2024-intro2ml-cern-school-of-computing.git(including a trailing.gitsuffix as indicated)
-
Hit
Download! -
You should see something like this
- Please open
notebooks/00_intro2ml_envcheck.ipynb. Read and run all cells!
If this repo changes, you may want to update your version of this repository on SWAN. To do this, you have to follow these 2 steps:
- Open a terminal in the SWAN webgui
- Navigate to your project space. According to the steps outlined earlier, this should be:
cd SWAN_projects/2024-intro2ml-cern-school-of-computing/- perform a git pull
git pullThis might look as much as:
This repo has a small utility prepared which can check if you software environment is ready. Either run:
python notebooks/00_intro2ml_envcheck.pyor open the paired notebook notebooks/00_intro2ml_envcheck.ipynb and execute all cells.







