Technology Solutions

🤖 Local AI Stack

GitHub Stars License Last Commit

Project Logo

kheiden-com/ai-stack View on GitHub

A powerful, self-hosted, and customizable AI stack that runs locally on your machine. This project bundles a suite of best-in-class open-source tools to provide a complete environment for local AI development, experimentation, and workflow automation.

📚 Stack Components

This stack uses a combination of pre-built images from Docker Hub and custom-built images.

✨ Features

🚀 Getting Started

Getting the stack running is as simple as running one command.

  1. Clone the repository:
    git clone https://github.com/kheiden-com/ai-stack.git
    cd ai-stack
  2. Run the setup script:
    • For Linux or macOS:
      ./setup.sh
    • For Windows (in a Powershell terminal):
      ./setup.ps1

Note: You may want to update the environment variables in the .env file prior to creating the stack. If you do not have a .env file in your directory before running the setup script, one will be created from the .env.template file.

That's it! The script will check for prerequisites, prepare the necessary configuration files, and launch all the services. It may take a while on the first run as Docker images are downloaded and built.

🔧 Advanced Usage

Customizing Ollama Models

You can control which models Ollama downloads by editing the ollama/models.txt file. Add one model name per line (e.g., mistral:latest). The models will be pulled automatically when the stack starts.

Managing Your Data

If you have existing data from another setup, you can copy it into the volumes used by this stack.

From a Docker Volume

To copy data from an existing Docker volume (e.g., old_ollama_data) to this stack's volume (ollama_storage), you can run:

docker run --rm -v old_ollama_data:/from -v ollama_storage:/to alpine sh -c "cd /from ; cp -av . /to"
From a Docker Image

To copy data from an existing Docker image (e.g., my-ollama:latest) into a volume used by this stack, you can run:

docker run --rm --entrypoint /bin/sh -v ollama_storage:/to my-ollama:latest -c "cp -av /root/.ollama/. /to/"
Copying Data Between Images

To create a new image by merging data from two existing images, you can use the provided scripts.

⁉️ Troubleshooting

❤️ Contributing

Contributions are welcome! If you have ideas for new features, improvements, or bug fixes, please feel free to:

  1. Open an issue to discuss your idea.
  2. Fork the repository and create a pull request.

Please make sure your code is well-documented and follows the existing style.

🔮 Future Updates