{"id":26722570,"url":"https://github.com/dmartingarcia/docker-ollama","last_synced_at":"2026-04-12T02:36:15.851Z","repository":{"id":284557059,"uuid":"955323904","full_name":"dmartingarcia/docker-ollama","owner":"dmartingarcia","description":"An docker compose implementation for running ollama with DeepSeek R1","archived":false,"fork":false,"pushed_at":"2025-03-26T16:16:20.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-04T06:29:50.166Z","etag":null,"topics":["ai","chatbot","deepseek","deepseek-r1","docker","docker-compose","dockercompose","ollama","openwebui"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmartingarcia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-26T13:15:31.000Z","updated_at":"2025-03-26T16:16:23.000Z","dependencies_parsed_at":"2025-03-26T14:32:04.884Z","dependency_job_id":"da341af4-ab7f-4836-a7cd-454848a8e620","html_url":"https://github.com/dmartingarcia/docker-ollama","commit_stats":null,"previous_names":["dmartingarcia/docker-ollama"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmartingarcia/docker-ollama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmartingarcia%2Fdocker-ollama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmartingarcia%2Fdocker-ollama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmartingarcia%2Fdocker-ollama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmartingarcia%2Fdocker-ollama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmartingarcia","download_url":"https://codeload.github.com/dmartingarcia/docker-ollama/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmartingarcia%2Fdocker-ollama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31702580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T21:17:31.016Z","status":"online","status_checked_at":"2026-04-12T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chatbot","deepseek","deepseek-r1","docker","docker-compose","dockercompose","ollama","openwebui"],"created_at":"2025-03-27T20:26:29.313Z","updated_at":"2026-04-12T02:36:15.412Z","avatar_url":"https://github.com/dmartingarcia.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Ollama with Web UI\n\nThis project provides a Docker setup for running Ollama AI locally with an intuitive web interface. Using Docker and Docker Compose, you can easily set up and manage your own instance of Ollama AI on your local machine.\n\n## 🎯 Advantages of Running Ollama AI Locally\n\n- **Privacy**: Keep your data secure by processing it locally\n- **Performance**: Reduce latency by avoiding network calls to external services\n- **Customization**: Tailor the AI to your specific needs without relying on third-party services\n- **Cost**: Save on costs associated with cloud-based AI services\n\n## 🚀 Features\n\n- [Ollama AI](https://github.com/ollama/ollama) model server with GPU support\n- [Open WebUI](https://github.com/open-webui/open-webui) for easy interaction with models\n- Persistent storage for models and configurations\n- Health checking and automatic restart\n- Traefik integration for reverse proxy support\n- Makefile for easy management\n- Easily customizable using the Modelfile\n\n## 📋 Prerequisites\n\n- Docker and Docker Compose\n- NVIDIA GPU with appropriate drivers (optional)\n- Make (for using the Makefile commands)\n\n## 🛠️ Getting Started\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/dmartingarcia/docker-ollama.git\ncd docker-ollama\n```\n\n### Quick Start\n\n1. Start the services:\n```bash\nmake run\n```\n\nIt will pull the R1 model by default, but you can change it on the Makefile to any other model\n\n2. Access the Web UI at `http://localhost:8080`\n\n## 📦 Available Make Commands\n\nShow available commands\n- `make list-models` - List all models\n- `make run` - Prepare and start all services\n- `make help` - Show available commands\n- `make up` - Start all services\n- `make down` - Stop all services\n- `make logs` - View logs\n- `make restart` - Restart services\n- `make clean` - Remove all containers and data\n- `make status` - Check service status\n- `make pull` - Update images\n- `make rebuild-model` - Rebuild the custom AI model\n\n## 🗂 Directory Structure\n\n```\ndocker-ollama/\n├── docker-compose.yml\n├── Makefile\n└── config/\n    ├── ollama/      # Ollama models and config\n    └── open-webui/  # WebUI data and settings\n```\n\n## ⚙️ Configuration\n\nThe setup includes:\n- GPU passthrough for Ollama\n- Persistent storage for models and configurations\n- Automatic container restart\n- Health checks for reliability\n- Traefik labels for reverse proxy setup\n\n## 🖥️ NVIDIA GPU Setup\n\nTo enable GPU support for your Docker containers, you need to install the NVIDIA Container Toolkit. Follow these steps:\n\n### Install NVIDIA Container Toolkit\n\n[Here's the latest version of the Nvidia documentation.](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/sample-workload.html)\n\nI would recommend to follow the documentation, or the [docker hub documentation](https://hub.docker.com/r/ollama/ollama) as it should be more up-to-date, but just in case you're in a hurry...\n\n1. Set up the package repository and the GPG key:\n    ```bash\n    curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey \\\n      | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg\n    curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list \\\n      | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \\\n      | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list\n    sudo apt-get update\n    ```\n\n2. Install the NVIDIA Container Toolkit:\n    ```bash\n    sudo apt-get install -y nvidia-container-toolkit\n    sudo nvidia-ctk runtime configure --runtime=docker\n    sudo systemctl restart docker\n    ```\n\n### Run Containers with GPU Access\n\nTo check if GPUS are accesible run the following command:\n\n```bash\ndocker run --gpus all nvidia/cuda:11.0-base nvidia-smi\n```\n\nIn your `docker-compose.yml`, ensure you have the following configuration for services requiring GPU access:\n\n```yaml\nservices:\n  ollama:\n    image: ollama/ollama:latest\n    deploy:\n      resources:\n        reservations:\n          devices:\n            - capabilities: [gpu]\n    runtime: nvidia\n    environment:\n      - NVIDIA_VISIBLE_DEVICES=all\n      - NVIDIA_DRIVER_CAPABILITIES=compute,utility\n```\n\nThis configuration ensures that the Ollama service has access to the GPU and the necessary CUDA environment.\n\n## 🔒 Security Note\n\nRemember to change the default credentials after your first login to the Web UI for security purposes.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmartingarcia%2Fdocker-ollama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmartingarcia%2Fdocker-ollama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmartingarcia%2Fdocker-ollama/lists"}