Last active
September 9, 2024 18:45
-
-
Save imaitland/de4b86bd758518ebf5ca802e02ea2330 to your computer and use it in GitHub Desktop.
sciserver install ollama
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Step 1: Create a directory called "ollama" | |
mkdir -p ollama | |
# Step 2: Inside the "ollama" directory, create a directory called "models" | |
mkdir -p ollama/models | |
# Step 3: Download the file into the "ollama" directory | |
cd ollama | |
curl -L https://ollama.com/download/ollama-linux-amd64.tgz -o ollama-linux-amd64.tgz | |
# Step 4: Install ollama by extracting the tar file in the current directory | |
tar -C ./ -xzf ollama-linux-amd64.tgz | |
# Step 5: Download the 'update_ollama_vars.sh' script directly | |
curl -L https://gist.githubusercontent.com/imaitland/4408f82852c41484712c287b778f07f8/raw/da9c040bc55e88b34bd677f5061d5e709440b72b/sciserver_update_ollama_vars.sh -o update_ollama_vars.sh | |
# Step 6: Source the 'update_ollama_vars.sh' script | |
source update_ollama_vars.sh | |
# End of script |
instructions
in sciserver's jupyter lab ui, create a file install_ollama.sh
at the path described above, copy this gist's contents there. Then in the jupyter lab terminal run bash install_ollama.sh
.
note: this install script copies the script located here to update env vars so you can run ollama's installed binary from the CLI, even though it's at an exotic path.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
some notes about sciserver's file system.
~/workspace/Storage/<username>/persistent
has 10gb capacity and is backed up to tape!, not really the right spot for this.~/workspace/Temporary/imaitla1/scratch/jobs
is unlimited capacity but limited persistence, ~90days. Not a huge issue as installing ollama once you've figured it out isn't too bad.To consider, I (iain) don't have write permissions on the /ssec dir you can choose to mount when you create your container. Once I have write permissions there I'll look at creating a dedicated
ollama
dir, with associated bin and models there.