Skip to content

Commit 0b47277

Browse files
committed
minor updates to pics, nav, and text
1 parent 5d271f2 commit 0b47277

File tree

15 files changed

+98
-50
lines changed

15 files changed

+98
-50
lines changed

docs/class1/class1.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ build out and customize in your own lab and extend for your specific needs.
2525
Resources
2626
---------
2727

28-
- :doc:`Docker Cheatsheet <resources/docker-cheatsheet>`
29-
- :doc:`Ollama Cheatsheet <resources/ollama-cheatsheet>`
28+
- `Docker Cheatsheet <resources/docker-cheatsheet>`_
29+
- `Ollama Cheatsheet <resources/ollama-cheatsheet>`_
3030

31+
Labs
32+
----
3133

3234
.. toctree::
3335
:maxdepth: 1

docs/class1/module1/lab1.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ small models on any system with modest specifications.
2525
**Perform these steps from the LLM Server (Web Shell recommended for ease of use)**
2626

2727
In your deployment, click on the **Components** tab, and under **Systems**, click **Access** on the
28-
LLM Server and select **WEB SHELL** as shown in the image below. This will launch the shell which
28+
**LLM Server** and select **WEB SHELL** as shown in the image below. This will launch the shell which
2929
you will use for the remainder of the labs in this module.
3030

3131
.. image:: images/00_llmserver_webshell_interface.png
3232

3333
Install Ollama
3434
--------------
3535

36-
The benefit of using Docker is the install aspect is a bit of a misnomer. Docker is the engine that
37-
is going to simply run the pre-configured install of Ollama in a container. That said, our Ollama
38-
server has an NVIDIA T4 GPU so we need to configure docker to use it before proceeding.
36+
Using Docker simplifies the installation process—or rather, eliminates it entirely. Docker runs a
37+
pre-configured Ollama container, so there's no traditional installation required. However, since our
38+
Ollama server has an NVIDIA T4 GPU, we need to configure Docker to access it before proceeding.
3939

4040
1. Configure Docker for GPU use
4141

@@ -94,7 +94,9 @@ The output should resemble this:
9494
llmserver-labnet:
9595
external: true
9696
97-
Note the key details on what image, container name, ports, persistent data volumen, and networks are associated.
97+
Note the key details on what image, container name, ports, persistent data volume, and networks are associated.
98+
The environment variables in this case are there to keep the models loaded in memory and allow concurrent
99+
requests. This should improve the wait times in some of the later labs.
98100

99101
4. Run the Ollama compose service.
100102

@@ -146,7 +148,7 @@ The output should resemble this:
146148

147149
.. code-block:: console
148150
149-
root@ip-10-1-1-5:/root# curl http://lcoalhost:11434
151+
root@ip-10-1-1-5:/root# curl http://localhost:11434
150152
Ollama is running
151153
152154
Recap
@@ -157,4 +159,4 @@ You now have the following:
157159
- A Docker container running the Ollama server
158160
- A Docker volume which is used as the file repository to store the models we'll install so they survive container restarts
159161

160-
Next we'll install a couple models.
162+
Next we'll install some models.

docs/class1/module1/lab2.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The output should resemble this:
105105
106106
root@ip-10-1-1-5:/root/ollama# docker exec ollama ollama ps
107107
NAME ID SIZE PROCESSOR CONTEXT UNTIL
108-
tinyllama:latest 2644915ede35 827 MB 100% CPU 4096 About a minute from now
108+
tinyllama:latest 2644915ede35 827 MB 100% CPU 4096 Forever
109109
110110
4. Let's run a quick test against the model! We'll do this three different ways, a one-shot prompt,
111111
an interactive shell, and with curl via the API.
@@ -176,7 +176,7 @@ We'll use curl in this lab to run a prompt against the Ollama API.
176176
"model": "tinyllama",
177177
"prompt": "Why is grass green?",
178178
"stream": false
179-
}'
179+
}' | jq .
180180
181181
The output should resemble this (cleaned up for readability):
182182

@@ -220,19 +220,19 @@ Field Description
220220

221221
.. code-block:: console
222222
223-
docker exec ollama ollama pull codellama
224-
docker exec ollama ollama pull deepseek-r1:1.5b
225-
docker exec ollama ollama pull deepseek-r1:7b
226-
docker exec ollama ollama pull llama3.2:3b
223+
docker exec ollama ollama run codellama
224+
docker exec ollama ollama run deepseek-r1:1.5b
225+
docker exec ollama ollama run deepseek-r1:7b
226+
docker exec ollama ollama run llama3.2:3b
227227
228228
The output should resemble this:
229229

230230
.. code-block:: console
231231
232-
root@ip-10-1-1-5:/root/ollama# docker exec ollama ollama pull codellama
233-
docker exec ollama ollama pull deepseek-r1:1.5b
234-
docker exec ollama ollama pull deepseek-r1:7b
235-
docker exec ollama ollama pull llama3.2:3b
232+
root@ip-10-1-1-5:/root/ollama# docker exec ollama ollama run codellama
233+
docker exec ollama ollama run deepseek-r1:1.5b
234+
docker exec ollama ollama run deepseek-r1:7b
235+
docker exec ollama ollama run llama3.2:3b
236236
pulling manifest
237237
pulling 3a43f93b78ec: 100% ▕██████████████████▏ 3.8 GB
238238
pulling 8c17c2ebb0ea: 100% ▕██████████████████▏ 7.0 KB

docs/class1/module1/lab3.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,25 @@ The output should resemble:
136136
-v /tmp/custom-models:/tmp/custom-models \
137137
alpine sh -c "cp -r /tmp/custom-models/* /root/.ollama/models/"
138138
139+
The output should resemble the following:
140+
141+
.. code-block:: console
142+
143+
root@ip-10-1-1-5:/root/ollama# docker run --rm \
144+
-v ollama_model_data:/root/.ollama \
145+
-v /tmp/custom-models:/tmp/custom-models \
146+
alpine sh -c "cp -r /tmp/custom-models/* /root/.ollama/models/"
147+
Unable to find image 'alpine:latest' locally
148+
latest: Pulling from library/alpine
149+
2d35ebdb57d9: Pull complete
150+
Digest: sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
151+
Status: Downloaded newer image for alpine:latest
152+
139153
4. Verify the modelfiles are now in your model_data docker volume
140154

141155
.. code-block:: console
142156
143-
ls -als /var/lib/docker/volumes/model_data/_data/models
157+
ls -als /var/lib/docker/volumes/ollama_model_data/_data/models
144158
145159
The output should resemble:
146160

docs/class1/module1/module1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Module 1: Large Language Models
22
===============================
33

4-
Here we'll start with the basics of large language models (LLMs) by installing and performing some preliminary work with the Ollama model management platform.
4+
We'll start with the basics of large language models (LLMs) by installing and performing some preliminary work with the Ollama model management platform.
55

66
.. toctree::
77
:maxdepth: 1
555 Bytes
Loading

docs/class1/module2/lab1.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,12 @@ should resemble this one:
153153
Now take a step back and see what you've just built. You have your own working generative AI environment!
154154
And your prompt session history in the left-hand menu, no less. Not too shabby, right?!?
155155

156-
You might have noticed that your initial prompt took a hot minute to get a response. This is due to the
157-
way Ollama is set up in docker by default. When you ran a model in Module 1 via a ``docker exec``
158-
command within the container, it loaded that model into memory, but only for a short while. You can see
159-
when I drop the model list down that there is a green dot next to tinylama, indicating that the model is
160-
loaded, and hovering over the green dot shows the tool tip that it will unload in 4 minutes.
156+
Depending on the model you chose, you might have noticed that your initial prompt took a hot minute to get
157+
a response. This is due to the way Ollama is set up in docker by default. When you ran a model in Module 1
158+
via a ``docker exec`` command within the container, it loaded that model into memory, but only for a short
159+
while after the first five models, which are set to stay loaded forever. You can see when I drop the model
160+
list down that there is a green dot next to the loaded models. Hovering over the model's green dot shows the
161+
tool tip that it will unload in 292 years. I think you'll make it through the lab!
161162

162163
.. image:: images/06_openwebui_chatbot_models.png
163164

docs/class1/module2/lab2.rst

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -399,20 +399,16 @@ The output should resemble this:
399399
root@ip-10-1-1-4:/root/open-webui# docker ps | grep open-webui$
400400
2fb45a840c35 ghcr.io/open-webui/open-webui:main "bash start.sh" 4 hours ago Up 19 minutes (healthy) 0.0.0.0:3000->8080/tcp open-webui
401401
402-
.. note::
403-
404-
If you want to pre-load the llama3.2:3b model into memory on the LLM server while you wait for open WebUI to get
405-
healthy, you can save a little wait time in prompting step below. Login to the webshell of the LLM server and type
406-
**docker exec ollama ollama run llama3.2:3b** and just leave that tab open.
407-
408-
4. Launch your Open WebUI tab again and login. Select the llama3.2:3b model, then click the diamond pattern
409-
in your chat block to reveal your tools and select the f5mcp tool.
402+
4. Launch your Open WebUI tab again and login. Select the **llama3.2:3b** model, then click the diamond pattern
403+
in your chat block to reveal your tools and select the **F5 MCP Server** tool.
410404

411405
.. image:: images/f5mcp_tools_display.png
412406

413407
.. note::
414408

415-
For each model you select to work with, you'll need to reattach your tools.
409+
For each model you select to work with, you'll need to reattach your tools. Also, if you don't see your tools
410+
yet, in the **web shell** in the **/root/open-webui** directory, do a **docker compose down** and then a
411+
**docker compse up**, wait for it to be healthy by running **docker ps**, and then check the model tools again.
416412

417413
5. Now prompt for the list of BIG-IP pools. I find on these smaller models I need to be more explicit and
418414
nudged as much as possible. Here's your chance to experiment on how you can get the model to a) actually use

docs/class1/module2/lab3.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ This should take a few minutes and resemble the output below.
6464
6565
You'll notice you are now at the container shell prompt instead of at the App Server prompt.
6666

67-
CONTINUE HERE AFTER LUNCH!!
68-
6967
Configure Fabric
7068
----------------
7169

@@ -141,7 +139,7 @@ for the other two. Your output should resemble the following before being presen
141139
142140
Specify HTTP timeout duration for Ollama requests (e.g. 30s, 5m, 1h) (leave empty for '20m' or type 'reset' to remove the value):
143141
144-
3. Select the **Default AI Vendor and Model** Tool by number and hit **Enter**. For now, choose llama3.2:3b.
142+
3. Select the **Default AI Vendor and Model** Tool by number and hit **Enter**. For now, choose **llama3.2:3b**.
145143
In my instance, that is number 6 but that might be different for you. Skip the model context length. Your output should
146144
resemble the following before being presented again with the main screen:
147145

@@ -376,6 +374,8 @@ You now have the following:
376374

377375
- A powerful command-line AI Assistant to optimize your data ingestion and note taking experiences.
378376

377+
In the **web shell** exit the container by typing **exit**
378+
379379

380380
This completes Module 2. Click Next to move on to Module 3.
381381

-27 KB
Loading

0 commit comments

Comments
 (0)