|
| 1 | +This guide provides a quick start for running different profiles of PrivateGPT using Docker Compose. |
| 2 | +The profiles cater to various environments, including Ollama setups (CPU, CUDA, MacOS) and fully Local setup. |
| 3 | + |
| 4 | +If you want to run PrivateGPT locally without Docker, refer to the [Local Installation Guide](/installation). |
| 5 | + |
| 6 | +#### Prerequisites |
| 7 | +- **Docker and Docker Compose:** Ensure both are installed on your system. |
| 8 | +[Installation Guide for Docker](https://docs.docker.com/get-docker/), [Installation Guide for Docker Compose](https://docs.docker.com/compose/install/). |
| 9 | +- **Clone PrivateGPT Repository:** Clone the PrivateGPT repository to your machine and navigate to the directory: |
| 10 | + ```sh |
| 11 | + git clone https://github.com/zylon-ai/private-gpt.git |
| 12 | + cd private-gpt |
| 13 | + ``` |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## Ollama Setups (Recommended) |
| 18 | + |
| 19 | +Ollama setups are recommended for their ease of use and optimized configurations. Ollama offers different profiles depending on your hardware capabilities and operating system. |
| 20 | + |
| 21 | +### 1. Default/Ollama CPU |
| 22 | + |
| 23 | +**Description:** |
| 24 | +This profile runs the Ollama service using CPU resources. It is the standard configuration for running Ollama-based Private-GPT services without GPU acceleration. |
| 25 | + |
| 26 | +**Run:** |
| 27 | +To start the services, use either of the following commands: |
| 28 | +```sh |
| 29 | +docker-compose up |
| 30 | +``` |
| 31 | +or |
| 32 | +```sh |
| 33 | +docker-compose --profile ollama up |
| 34 | +``` |
| 35 | + |
| 36 | +### 2. Ollama Nvidia CUDA |
| 37 | + |
| 38 | +**Description:** |
| 39 | +This profile leverages GPU acceleration with CUDA support, suitable for computationally intensive tasks that benefit from GPU resources. |
| 40 | + |
| 41 | +**Requirements:** |
| 42 | +- Ensure that your system has compatible GPU hardware and the necessary NVIDIA drivers installed. The installation process is detailed [here](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html). |
| 43 | + |
| 44 | +**Run:** |
| 45 | +To start the services with CUDA support, use: |
| 46 | +```sh |
| 47 | +docker-compose --profile ollama-cuda up |
| 48 | +``` |
| 49 | + |
| 50 | +### 3. Ollama Host |
| 51 | + |
| 52 | +**Description:** |
| 53 | +This profile is designed for running PrivateGPT using Ollama installed on the host machine. This setup is particularly useful for MacOS users, as Docker does not yet support Metal GPU. |
| 54 | + |
| 55 | +**Requirements:** |
| 56 | +- Install Ollama on your machine by following the instructions at [ollama.ai](https://ollama.ai/). |
| 57 | +- Start the Ollama service with the command: |
| 58 | +```sh |
| 59 | +OLLAMA_HOST=0.0.0.0 ollama serve |
| 60 | +``` |
| 61 | + |
| 62 | +**Run:** |
| 63 | +To start the services with the host configuration, use: |
| 64 | +```sh |
| 65 | +docker-compose --profile ollama-host up |
| 66 | +``` |
| 67 | + |
| 68 | +--- |
| 69 | + |
| 70 | +## Fully Local Setups |
| 71 | + |
| 72 | +### LlamaCPP + HuggingFace Embeddings |
| 73 | + |
| 74 | +**Description:** |
| 75 | +This profile runs the Private-GPT services locally using `llama-cpp` and Hugging Face models. |
| 76 | + |
| 77 | +**Requirements:** |
| 78 | +- **Hugging Face Token (HF_TOKEN):** Required for accessing Hugging Face models. Obtain your token following [this guide](/installation/getting-started/troubleshooting#downloading-gated-and-private-models). |
| 79 | + |
| 80 | +**Run:** |
| 81 | +Start the services with your Hugging Face token: |
| 82 | +```sh |
| 83 | +HF_TOKEN=<your_hf_token> docker-compose up --profile local |
| 84 | +``` |
| 85 | +Replace `<your_hf_token>` with your actual Hugging Face token. |
0 commit comments