dino assistant on a raspberry

How to Set Up a Personal AI Assistant on Raspberry Pi

Running Self-Hosted DocsGPT on Compact Systems

In this guide, we will walk you through setting up DocsGPT on a Raspberry Pi. This setup is designed to work within a local network using the DocsGPT LLM API, offering a straightforward installation process without the need to deploy a local language model. While several installation methods are available, we have chosen this one for its simplicity and ease of implementation.

DocsGPT logo and RaspberryPi

Preparing Your Raspberry Pi

To get started, you will need the following:
• Raspberry Pi: We have used the 4th generation.
• Operating System: We have opted for DietPi because of its lightweight nature.
• Docker and Docker-Compose: These tools are essential for running containerized applications. Ensure they are installed before proceeding with the setup.

Installation Steps

1. Obtain DocsGPT Source Files

First, you need to acquire the source files for DocsGPT. You can clone the repository using Git:

git clone https://github.com/arc53/DocsGPT.git

or download a ZIP file directly from the DocsGPT GitHub repository. After obtaining the files, navigate to the DocsGPT folder.

2. Determine Your Local IP Address

Knowing your Raspberry Pi's local IP address is crucial if you want to connect from other devices. You can find this information through your router's network interface or using command like:

ip addr

3. Modify the Docker-Compose Configuration

Adjust the docker-compose.yaml file to ensure compatibility with your Raspberry Pi:
Update the VITE_API_HOST variable to reflect your Raspberry Pi's local IP address followed by :7091. This makes DocsGPT accessible from other devices in your network.
Change the MongoDB image from mongo:6 to mongo:4.4.8. This step is necessary because MongoDB versions 5 and 6 are not compatible with Raspberry Pi due to their ARMv8.2-A microarchitecture requirements.
Download edited docker-compose.yaml

4. Run the Installation Script

In your terminal execute the command:

./setup.sh

This script facilitates the installation process. Follow the on-screen instructions and select the first option if you are unfamiliar with DocsGPT.

Troubleshooting Common Installation Issues

During the installation, you might encounter several issues:
Compose Timeout Error: The Raspberry Pi may process tasks slower than more powerful machines. To accommodate this, increase the HTTP timeout for Docker Compose by setting:

export COMPOSE_HTTP_TIMEOUT=120

File Permission Adjustments: The Raspberry Pi might encounter permission issues during file uploads if DocsGPT lacks the necessary access to write to local directories. To resolve this, adjust the file permissions using the following commands in your terminal:

chmod -R 600 ./application/inputs
chmod -R 600 ./application/indexes
chmod -R 600 ./application/vectors
Dino repairing

Wrapping Up

Setting up DocsGPT on a Raspberry Pi enables you to leverage the power of a personal AI assistant right within your local network. This setup not only enhances your productivity but also provides a customizable and secure AI tool for managing various tasks. Whether you are a hobbyist looking to experiment with AI or a professional needing an efficient document management solution, DocsGPT offers a range of capabilities that can transform how you interact with digital information. By following this guide, you can ensure a successful installation and enjoy the benefits of having an advanced AI assistant at your fingertips.

Check out the Cloud version