Skip to content

Commit

Permalink
Merge pull request #236 from tokk-nv/dev/openwebui
Browse files Browse the repository at this point in the history
Add Open WebUI page and adjust the Ollama page
  • Loading branch information
tokk-nv authored Dec 15, 2024
2 parents b70f450 + 35ec9c2 commit ca35db4
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 4 deletions.
Binary file added docs/images/open_webui_on_desktop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 14 additions & 3 deletions docs/tutorial_ollama.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Tutorial - Ollama

[Ollama](https://github.com/ollama/ollama){:target="_blank"} is a popular LLM tool that's easy to get started with, and includes a built-in [model library](https://ollama.com/library){:target="_blank"} of pre-quantized weights that will automatically be downloaded and run using llama.cpp underneath for inference. The [ollama container](https://github.com/dusty-nv/jetson-containers/tree/dev/packages/llm/ollama){:target="_blank"} was compiled with CUDA support.
[Ollama](https://ollama.com){:target="_blank"} is a popular open-source tool that allows users to easily run a large language models (LLMs) locally on their own computer, serving as an accessible entry point to LLMs for many.

It now offers out-of-the-box support for the Jetson platform with CUDA support, enabling Jetson users to seamlessly install Ollama with a single command and start using it immediately.

In this tutorial, we introduce two installation methods: (1) the default native installation using the official Ollama installer, and (2) the Docker container method, which allows users to avoid making changes to their existing system.

<img src="https://github.com/dusty-nv/jetson-containers/blob/docs/docs/images/ollama_cli.gif?raw=true" width="750px"></img>

Expand Down Expand Up @@ -29,6 +33,15 @@
- `7GB` for `ollama` container image
- Space for models (`>5GB`)

## (1) Native Install

```bash
curl -fsSL https://ollama.com/install.sh | sh
```

## (2) Docker container for `ollama` using `jetson-containers`

```
# models cached under jetson-containers/data
jetson-containers run --name ollama $(autotag ollama)
Expand All @@ -39,8 +52,6 @@ docker run --runtime nvidia --rm --network=host -v ~/ollama:/ollama -e OLLAMA_MO

Running either of these will start the local Ollama server as a daemon in the background. It will save the models it downloads under your mounted `jetson-containers/data/models/ollama` directory (or another directory that you override with `OLLAMA_MODELS`)

## Ollama Client

Start the Ollama command-line chat client with your desired [model](https://ollama.com/library){:target="_blank"} (for example: `llama3`, `phi3`, `mistral`)

```
Expand Down
49 changes: 49 additions & 0 deletions docs/tutorial_openwebui.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Tutorial - Open WebUI

[Open WebUI](https://github.com/ollama/ollama){:target="_blank"} is a versatile, browser-based interface for running and managing large language models (LLMs) locally, offering Jetson developers an intuitive platform to experiment with LLMs on their devices.

It can work with Ollama as a backend as well as other backend that is compatible with OpenAI, which can also run well on Jetson.

![alt text](<images/open_webui_on_desktop.png>)

## Ollama Server

!!! abstract "What you need"

1. One of the following Jetson devices:

<span class="blobDarkGreen4">Jetson AGX Orin (64GB)</span>
<span class="blobDarkGreen5">Jetson AGX Orin (32GB)</span>
<span class="blobLightGreen3">Jetson Orin NX (16GB)</span>
<span class="blobLightGreen3">Jetson Orin Nano (8GB)</span>
2. Running one of the following versions of [JetPack](https://developer.nvidia.com/embedded/jetpack){:target="_blank"}:

<span class="blobPink1">JetPack 5 (L4T r35.x)</span>
<span class="blobPink2">JetPack 6 (L4T r36.x)</span>

3. Sufficient storage space (preferably with NVMe SSD).

- `7GB` for `open-webui` container image
```
sudo docker run -d --network=host \
-v ${HOME}/open-webui:/app/backend/data \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
```

## Ollama backend

If you <a href="./tutorial_ollama.html">have installed Ollama</a>, you can just run the Open WebUI docker container without installing any other things.

```
sudo docker run -d --network=host \
-v ${HOME}/open-webui:/app/backend/data \
-e OLLAMA_BASE_URL=http://127.0.0.1:11434 \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:main
```
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ nav:
- Agent Studio: agent_studio.md
- Text (LLM):
- text-generation-webui: tutorial_text-generation.md
- ollama: tutorial_ollama.md
- Ollama: tutorial_ollama.md
- Open WebUI: tutorial_openwebui.md
- llamaspeak: tutorial_llamaspeak.md
- NanoLLM: tutorial_nano-llm.md
- TensorRT-LLM 🆕: tensorrt_llm.md
Expand Down

0 comments on commit ca35db4

Please sign in to comment.