================
Ollama Compose is a Docker-based project that provides a scalable and efficient way to deploy Ollama, a powerful AI model, along with its dependencies.
Ollama Compose is designed to simplify the deployment of Ollama and its dependencies, including OpenWebUI, PostgreSQL (pgvector), and Apache Tika. The project uses Docker Compose to manage the containers and provide a scalable architecture.
- Docker installed on your system
- Docker Compose installed on your system
- (optional) NVIDIA GPU drivers installed on your system (for GPU acceleration)
- Clone the repository:
git clone https://github.com/your-username/ollama-compose.git - Change into the project directory:
cd ollama-compose - Create a copy of the
.env.examplefile and rename it to.env:cp .env.example .env - Update the environment variables in the
.envfile to match your setup - Run
docker-compose up -dto start the containers in detached mode
The project uses environment variables to configure the containers. You can update the .env file to change the configuration.
OLLAMA_PORT: The port number to use for the Ollama serverOPENWEBUI_PORT: The port number to use for the OpenWebUI serverPOSTGRES_USER: The username to use for the PostgreSQL databasePOSTGRES_PASSWORD: The password to use for the PostgreSQL databasePOSTGRES_DB: The name of the PostgreSQL databaseSERVER_HOSTNAME: The FQDN of your application.localhostif you only run locally.
Edit the models.txt file to add the models you are planning to use. Each model has to be in a newline. Make sure to save the file in UTF-8 without BOM.
- Access the OpenWebUI interface at
https://localhost
- Check the container logs for errors:
docker-compose logs - Check the Ollama server logs for errors:
docker-compose exec ollama /bin/ollama logs
Contributions are welcome! Please submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.