Demo for running LLMs on OpenShift using Ollama and accessing it via Open WebUI.
This demo:
- Deploys a Large Language Model (LLM) using Ollama on OpenShift
- Exposes the model through Open WebUI
- Supports running a single model or preloading multiple models
β οΈ Note:
This was built and tested on OpenShift running on AWS using anmx6a.4xlargeEC2 instance. It is resource-intensive, especially in terms of memory.
If you're deploying in a different environment or using a non-gp3-csistorage class, update thePersistentVolumeClaimdefinitions accordingly.
To deploy with the default model (granite3.3:8b), run:
oc apply -k k8/baseThis deploys the ollama service in the ollama-granite-demo namespace and preloads the model defined in config-ollama.yaml.
To change the model, update the MODEL_NAME in k8/base/config-ollama.yaml.
To preload multiple models (granite3.3:8b, mistral, llama3), run:
oc apply -k k8/overlays/multi-modelThis deploys the ollama service in the multi-model namespace and preloads the models defined in config-ollama.yaml.
Once deployed, get the Open WebUI route:
oc get routesExample output:
NAME HOST/PORT
open-webui open-webui-ollama-granite-demo.apps.<your-domain>Open that URL in your browser. The first time you access it, you'll be prompted to create an admin account.
- Change default model: edit the
MODEL_NAMEvalue in the ConfigMap (k8/base/config-ollama.yaml) - Add more models: update the
MODELSkey in the ConfigMap ink8/overlays/multi-model/config-ollama.yaml