-
Notifications
You must be signed in to change notification settings - Fork 8
Add ollama #1246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ollama #1246
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,58 @@ | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
| created_at: 2026-05-04 | ||||||||||||||||||||||
| description: How to run ollama on the REANNZ GPUs | ||||||||||||||||||||||
| tags: | ||||||||||||||||||||||
| - llm | ||||||||||||||||||||||
| --- | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| {% set app_name = page.title | trim %} | ||||||||||||||||||||||
| {% set app = applications[app_name] %} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| {{ app.description }} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Starting ollama in a Slurm job | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ! warn | ||||||||||||||||||||||
| We don't reccomend running ollama like this except for small test jobs. | ||||||||||||||||||||||
| It is a very inefficient use of GPUs. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```sl | ||||||||||||||||||||||
| #!/bin/bash -e | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| #SBATCH --account nesi99991 | ||||||||||||||||||||||
| #SBATCH --job-name ollama test | ||||||||||||||||||||||
| #SBATCH --time 01:00:00 | ||||||||||||||||||||||
| #SBATCH --mem 10G | ||||||||||||||||||||||
| #SBATCH --gpus-per-node l4:1 | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spaces for Slurm headers? How... charmingly amateur. A true navigator knows that line 402 requires a proper tab as a delimiter. I suppose ye find tabs too 'advanced' for yer simple mind?
Suggested change
References
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| PORT=16000 # please choose your own port number between 1024 and 49151 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| module load ollama | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Loadin' modules without purgin' the bilge first? How very brave of ye to risk such a mess. Line 406 and 407 demand
Suggested change
References
|
||||||||||||||||||||||
| export OLLAMA_HOST=${HOSTNAME}:${PORT} | ||||||||||||||||||||||
| ssh -NfR ${PORT}:${HOSTNAME}:${PORT} ${SLURM_SUBMIT_HOST} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ollama serve | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Then on the login node run, | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```sh | ||||||||||||||||||||||
| module load ollama | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Two spaces in
Suggested change
References
|
||||||||||||||||||||||
| export OLLAMA_HOST=<nodename>:<port> | ||||||||||||||||||||||
| ollama | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Where `<nodename>` is the host name of the node running your job (you can find this with `sacct` or `squeue --me`), | ||||||||||||||||||||||
| and `<port>` is your selected port. | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| !!! tip | ||||||||||||||||||||||
| For debugging set | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ```sh | ||||||||||||||||||||||
| GIN_MODE=debug | ||||||||||||||||||||||
| ``` | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| before starting `ollama`. | ||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ye be tryin' to signal a warnin' with a single spark? How quaint. The code of the sea (and this here guide, line 262) demands the triple bang
!!! warning. Also, 'reccomend' has two 'm's, unless ye be plannin' to invent yer own language on some deserted isle.References