You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cloud-infrastructure/ai-infra-gpu/ai-infrastructure/ollama-openwebui-mistral/README.md
+22-16Lines changed: 22 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Deploying Ollama and Open WebUI on OKE
2
2
3
-
In this tutorial, we will explain how to use famous Mistral models in a browser using Open WebUI. The LLM will be served using Ollama and the overal infrastructure will rely on an Oracle Kubernetes Engine with a NVIDIA A10 GPU node pool.
3
+
In this tutorial, we will explain how to use a Mistral AI large language model (LLM) in a browser using the Open WebUI graphical interface. The LLM will be served using the Ollama framework and the overall infrastructure will rely on an Oracle Kubernetes Engine cluster with a NVIDIA A10 GPU based node pool.
4
4
5
5
## Prerequisites
6
6
@@ -24,7 +24,7 @@ The easiest way is to use the Quick Create cluster assistant with the following
24
24
25
25
### Accessing the cluster
26
26
27
-
Click Access Cluster, choose Cloud Shell Access or Local Access and follow the instructions. If you select Local Access, you must first install and configure the OCI CLI package. Check that the nodes are there:
27
+
Click Access Cluster, choose Cloud Shell Access or Local Access and follow the instructions. If you select Local Access, you must first install and configure the [OCI CLI package](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/cliconcepts.htm). We can now check that the nodes are there:
(The following manifests are not tied to any GPU type.)
64
-
65
63
66
64
### Installing the NVIDIA GPU Operator
67
65
68
-
You can access the cluster either using Cloud Shell or using a standalone instance. The NVIDIA GPU Operator enhances the GPU features visibility in Kubernetes. The easiest way to install it is to use `helm`.
66
+
You can access the cluster either using Cloud Shell or using a standalone instance. The NVIDIA GPU Operator enhances the GPU features visibility in Kubernetes. The easiest way to install it is to use `Helm` ([Installing Helm](https://helm.sh/docs/intro/install/)).
To deploy Ollama, simply use the `ollama-deployment.yml` manifest.
119
+
[Ollama](https://ollama.com/) is an open source framework for deploying and training language models on a local machine such as a cloud instance. To deploy Ollama, simply use the `ollama-deployment.yml` manifest.
122
120
```
123
121
kubectl apply -f ollama-deployment.yaml
124
122
```
@@ -129,14 +127,13 @@ kubectl get all
129
127
130
128
### Pulling the model from pod
131
129
132
-
Enter the container:
130
+
The `ollama` image does not come with any models. Therefore, it is necessary to download it manually. Enter the container:
where `ollama-deployment-pod` is the name of the pod displayed by the `kubectl get pods` command.
137
-
Check Ollama installation and pull desired model(s), here Mistral 7B version 0.3 from Mistral AI, simply referred to as `mistral`:
135
+
Pull the desired model(s), here Mistral 7B version 0.3, simply referred to as `mistral`:
138
136
```
139
-
ollama --version (optional)
140
137
ollama pull mistral
141
138
```
142
139
For more model options, the list of all supported models can be found in [here](https://ollama.com/search).
@@ -157,9 +154,9 @@ One of Mistral AI's most notable projects is "La Mesure," a large-scale French l
157
154
Exit the container by simply typing `exit`.
158
155
159
156
160
-
### Creating Ollama service
157
+
### Creating an Ollama service
161
158
162
-
The Ollama service can be created using the `ollama-service.yaml` manifest:
159
+
A Service is necessary to make the model accessible from outside of the node. The Ollama (load balancer with a public IP address) service can be created using the `ollama-service.yaml` manifest:
Open WebUI can be deployed using the `openwebui-deployment.yaml` manifest:
168
+
Open WebUI is a user-friendly self-hosted AI platform that supports multiple LLM runners including Ollama. It can be deployed using the `openwebui-deployment.yaml` manifest. First set the `OLLAMA_BASE_URL` value in the manifest and apply it:
172
169
```
173
170
kubectl apply -f openwebui-deployment.yaml
174
171
```
175
172
176
173
### Creating Open WebUI service
177
174
178
-
The Open WebUI service can be created using the `openwebui-service.yaml` manifest:
175
+
Like Ollama, OpenWebUI requires a Service (load balancer with a public IP address) to be reached. The Open WebUI service can be created using the `openwebui-service.yaml` manifest:
179
176
```
180
177
kubectl apply -f openwebui-service.yaml
181
178
```
182
179
183
180
## Testing the platform
184
181
185
-
Check that everything is running:
182
+
An easy way to check that everything is running is to run the following command:
186
183
```
187
184
kubectl get all
188
185
```
189
-
Go to `http://xxx.xxx.xxx.xxx:81` where xxx.xxx.xxx.xxx is the external IP address of the Open WebUI load balancer and click on `Get started` and create admin account (local).
186
+
Go to `http://XXX.XXX.XXX.XXX:81` where XXX.XXX.XXX.XXX is the external IP address of the Open WebUI load balancer and click on `Get started` and create admin account (local).
190
187
191
-
If no model can be found, go to `Profile > Settings > Admin Settings > Connections > Manage Ollama API Connections`. Verify that the Ollama address matches the Ollama service load balancer external IP address and check the connection by clicking on the `Configure icon > Verify Connection`.
188
+
If no model can be found, go to `Profile > Settings > Admin Settings > Connections > Manage Ollama API Connections` and verify that the Ollama address matches the Ollama service load balancer external IP address and check the connection by clicking on the `Configure icon > Verify Connection`.
Copy file name to clipboardExpand all lines: cloud-infrastructure/ai-infra-gpu/ai-infrastructure/ollama-openwebui-mistral/assets/scripts/openwebui-deployment.yaml
0 commit comments