Pre-work¶
Assumptions:
These labs can be run on a Windows 11 or MacOS machine. Click on the operation system you are using below to get the corresponding instructions.
Ollama Installation¶
-
Download Ollama for Windows
-
Install Ollama by double-clicking on the downloaded
OllamaSetup.exe
And then clicking on "Install" -
In a CMD or terminal window, pull down the Granite models you will want to use in the workshop. Larger models take more memory to run but can give better results. It will take time to download the bigger models depending on your network speed.
ollama pull granite3.3:2b ollama pull granite3.2-vision:2b ollama pull granite3.3:8b
Note: We won't use them for this lab, but if you wanted to try some other LLM models, you can start with:
ollama pull deepseek-r1:1.5b
ollama pull llama3.2:3b
-
Download Ollama for Mac
-
Drag the Ollama to your applications folder, then double-click on the ollama application to start it up.
-
In a terminal window, pull down the Granite models you will want to use in the workshop. Larger models take more memory to run but can give better results. It will take time to download the bigger models depending on your network speed.
ollama pull granite3.3:2b ollama pull granite3.2-vision:2b ollama pull granite3.3:8b
Note: We won't use them for this lab, but if you wanted to try some other LLM models, you can start with:
Check out the entire Hugging face library of models at: https://ollama.com/libraryollama pull deepseek-r1:1.5b ollama pull llama3.2:3b
Install Python¶
For the workshop you will need Python 3.11.9. Follow the steps below for your operating system:
-
Download the Python python-3.11.9-amd64.exe
-
Double-click to install it
Note
While installing - make sure you check the box to "add the python.exe to path"**
-
Close and re-open your command prompt and then check to make sure python is findable on the path by typing:
It should return: "Python 3.11.9"python --version
Note
If it doesn't find the python command, likely you forgot to check the box to put python in the path. No worry, just:
- Double-click on the downloaded python-3.1.9-amd64.exe file again and this time chose "Modify" and click "next"
- Put a check next to the box: "Add Python to the environnment variables" and click "Install".
-
Optionally, you can also download and install git from git-scm.com/downloads
- The latest one as of writing this document is: Git-2.49.0-64-bit.exe
- Double-click on the downloaded Git-2.49.0-64-bit.exe, take all the defaults and install
-
Open a terminal window and check to see if you have the brew command already:
brew
-
If you have Brew, skip to the next step. Otherwise, install brew on MacOS with this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
-
Install uv for MacOS. If you don't have them already:
brew update brew install uv
-
Install Python 3.11.9 for MacOS
uv venv --python 3.11 --seed .venv
-
Activate the Python virtual env you just created:
source .venv/bin/activate
-
Verify the Python version:
It should return now 3.11.xpython --version
Python Virtual Environment:¶
Python virtual environment is used to isolated Python installations. Let's create one called "venv" and use it for the workshop.
-
Open the command prompt run the following command to create a new virtual environment:
python -m venv --upgrade-deps --clear venv
-
Activate your python environment by typing:
"venv/Scripts/activate.bat"
-
Open up a terminal window and install Python 3.11.x for MacOS which also creates a python virtual environment
uv venv --python 3.11 --seed .venv
-
Activate the Python virtual env you just created:
source .venv/bin/activate
-
Verify the Python version:
It should return now 3.11.xpython --version
Install the Open-WebUI¶
- In the open command prompt, run the following command to Install the Open-WebUI:
pip install open-webui
- In the open terminal window, run the following command to Install the Open-WebUI:
uv pip install open-webui
- Start up open-webui. You will leave this running during the workshop.
open-webui serve
Access Open-WebUI¶
-
Once the open-webui starts, use a browser to login to open-webui: http://localhost:8080
-
Enter a name, email address and password - these are stored locally. (Don't forget them!)
Create scripts to activate and start your environments up with one "go-webui" script going forward:¶
-
In a command prompt, type in "notepad go-webui.bat" and press enter, then add the following info and press save:
@echo off CALL "%USERPROFILE%\venv\Scripts\activate.bat" open-webui serve
-
Run the bat script from the command line in the future by typing:
go-webui.bat
- Open a terminal window and run the following commands to create a go-webui.sh shell script:
echo "source .venv/bin/activate" > ~/Desktop/go-webui.command echo "open-webui serve" >> ~/Desktop/go-webui.command chmod +x ~/Desktop/go-webui.command
-
Run the shell script from a terminal window in the future by typing:
~/Desktop/go-webui.command/go-webui.command
Or you can doubleclick on the go-webui.command window on your Desktop
Cleaning up after the lab is complete:¶
-
Remove all the models you don't want:
ollama list ollama rm granite3.3:2b granite3.3:8b granite3.2-vision:2b
-
Uninstall ollama:
In the search bar, search for Settings → Apps → Installed Apps and search for Ollama and click on Uninstall
In a terminal, use
brew
to uninstallollama
:brew uninstall ollama
Or if you dragged Ollama to the applicatino folder, you can delete the Ollama application in the Application folder.
-
Stop and remove open-webUI:
-
In the command line where open-webui is running, do a ctrl-C to stop the "open-webui serve"
-
Deactivate your python environment session by typing:
venv/Scripts/deactivate.bat
-
If you want to remove the virtual environment completely:
rmdir /s venv
- In the command line where open-webui is running, do a ctrl-C to stop the "open-webui serve"
- Deactivate your python environment session by typing:
deactivate
- If you want to remove the virutal environment completely:
rm -rf venv
-