Welcome to RDK X5 Board repository
1.AI-Large-Model-Environment-Deployment
Ollama
Ollama1. Large Language Models (LLM)2. Ollama InstallationScript Installation3. Using Ollama4. Uninstalling OllamaReferences
Demonstration Environment
Development Board: RDK X5 mainboard
SD Card: 64G
Tutorial Scope
| Mainboard Model | Supported |
|---|---|
| rdk x5 4gb | √ |
| rdk x5 8gb | √ |
Ollama is an open-source tool designed to simplify the deployment and running process of large language models, allowing users to use high-quality language models in a local environment.
1. Large Language Models (LLM)
Large Language Models (LLMs) are a class of advanced text generation systems based on artificial intelligence technology. Their main feature is their ability to learn and understand human language through large-scale training data and to generate naturally fluent text.
2. Ollama Installation
Note: It is recommended to use the image with the environment configured by Yahboom. It takes a long time to configure the environment personally, and there may be exceptions during installation on different system versions.
The tutorial demonstrates how to install Ollama on the rdk x5 mainboard using a script. (The large language model image provided by Yahboom has the environment configured and does not need to be installed again.)
Script Installation
sudo apt install curl -ysudo curl -fsSL https://ollama.com/install.sh | sh
The entire installation process takes a long time, please wait patiently!
Note: It is normal for ollama pull to fail; you can try multiple times, or pull after setting up a proxy. The method for setting up a proxy requires you to search online yourself.
It is complete when the installation is displayed:

3. Using Ollama
Enter ollama in the terminal to see the prompt:

| Command | Function |
|---|---|
| ollama serve | Start ollama |
| ollama create | Create a model from a model file |
| ollama show | Show model information |
| ollama run | Run a model |
| ollama stop | Stop a model |
| ollama pull | Pull a model from the registry |
| ollama push | Push a model to the registry |
| ollama list | List models |
| ollama ps | List running models |
| ollama cp | Copy a model |
| ollama rm | Remove a model |
| ollama help | Get help information about any command |
4. Uninstalling Ollama
Delete the service
xxxxxxxxxxsudo systemctl stop ollamasudo systemctl disable ollamasudo rm /etc/systemd/system/ollama.service
Delete the file
xxxxxxxxxxsudo rm $(which ollama)
Delete the model and service user and group
xxxxxxxxxxsudo rm -r /usr/share/ollamasudo userdel ollamasudo groupdel ollama
References
Ollama
Official Website: https://ollama.com/
GitHub: https://github.com/ollama/ollama