{"id":14155219,"url":"https://github.com/valiantlynx/ollama-docker","last_synced_at":"2025-03-16T16:04:39.735Z","repository":{"id":220959776,"uuid":"752840454","full_name":"valiantlynx/ollama-docker","owner":"valiantlynx","description":"Welcome to the Ollama Docker Compose Setup! This project simplifies the deployment of Ollama using Docker Compose, making it easy to run Ollama with all its dependencies in a containerized environment","archived":false,"fork":false,"pushed_at":"2025-02-27T18:22:49.000Z","size":59,"stargazers_count":918,"open_issues_count":6,"forks_count":188,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-08T06:34:15.176Z","etag":null,"topics":["docker","docker-compose","ollama"],"latest_commit_sha":null,"homepage":"https://ollama-docker.azurewebsites.net/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valiantlynx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["valiantlynx"],"patreon":"valiantlynx","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"polar":null,"custom":null}},"created_at":"2024-02-04T23:39:11.000Z","updated_at":"2025-03-07T19:41:11.000Z","dependencies_parsed_at":"2024-03-03T00:26:09.341Z","dependency_job_id":"afa0af74-e80c-4db3-9fbf-0199ec79897c","html_url":"https://github.com/valiantlynx/ollama-docker","commit_stats":{"total_commits":50,"total_committers":4,"mean_commits":12.5,"dds":0.36,"last_synced_commit":"e8fe60571757c34508520c4c2be13882f6eb1282"},"previous_names":["valiantlynx/ollama-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Follama-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Follama-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Follama-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valiantlynx%2Follama-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valiantlynx","download_url":"https://codeload.github.com/valiantlynx/ollama-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893827,"owners_count":20364916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["docker","docker-compose","ollama"],"created_at":"2024-08-17T08:02:33.563Z","updated_at":"2025-03-16T16:04:39.717Z","avatar_url":"https://github.com/valiantlynx.png","language":"HTML","funding_links":["https://github.com/sponsors/valiantlynx","https://patreon.com/valiantlynx"],"categories":["HarmonyOS","HTML","docker-compose"],"sub_categories":["Windows Manager"],"readme":"# Ollama Docker Compose Setup\r\n\r\nWelcome to the Ollama Docker Compose Setup! This project simplifies the deployment of Ollama using Docker Compose, making it easy to run Ollama with all its dependencies in a containerized environment.\r\n[![Star History Chart](https://api.star-history.com/svg?repos=valiantlynx/ollama-docker\u0026type=Date)](https://star-history.com/#valiantlynx/ollama-docker\u0026Date)\r\n\r\n## Getting Started\r\n\r\n### Prerequisites\r\nMake sure you have the following prerequisites installed on your machine:\r\n\r\n- Docker (should also be able to run docker compose ...)\r\n\r\n#### GPU Support (Optional)\r\n\r\nIf you have a GPU and want to leverage its power within a Docker container, follow these steps to install the NVIDIA Container Toolkit:\r\n\r\n```bash\r\ncurl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \\\r\n  \u0026\u0026 curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \\\r\n    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \\\r\n    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list\r\nsudo apt-get update\r\nsudo apt-get install -y nvidia-container-toolkit\r\n\r\n# Configure NVIDIA Container Toolkit\r\nsudo nvidia-ctk runtime configure --runtime=docker\r\nsudo systemctl restart docker\r\n\r\n# Test GPU integration\r\ndocker run --gpus all nvidia/cuda:11.5.2-base-ubuntu20.04 nvidia-smi\r\n```\r\n\r\n### Configuration\r\n\r\n1. Clone the Docker Compose repository:\r\n\r\n    ```bash\r\n    git clone https://github.com/valiantlynx/ollama-docker.git\r\n    ```\r\n\r\n2. Change to the project directory:\r\n\r\n    ```bash\r\n    cd ollama-docker\r\n    ```\r\n\r\n## Usage\r\n\r\nStart Ollama and its dependencies using Docker Compose:\r\n\r\nif gpu is configured\r\n```bash\r\ndocker compose -f docker-compose-ollama-gpu.yaml up -d\r\n```\r\n\r\nelse\r\n```bash\r\ndocker compose up -d\r\n```\r\n\r\nVisit [http://localhost:8080](http://localhost:8080) in your browser to access Ollama-webui.\r\n\r\n### Model Installation\r\n\r\nNavigate to settings -\u003e model and install a model (e.g., llava-phi3). This may take a couple of minutes, but afterward, you can use it just like ChatGPT.\r\n\r\n### Explore Langchain and Ollama\r\n\r\nYou can explore Langchain and Ollama within the project. A third container named **app** has been created for this purpose. Inside, you'll find some examples.\r\n\r\n### Devcontainer and Virtual Environment\r\n\r\nThe **app** container serves as a devcontainer, allowing you to boot into it for experimentation. Additionally, the run.sh file contains code to set up a virtual environment if you prefer not to use Docker for your development environment.\r\nif you have vs code and the `Remote Development´ extension simply opening this project from the root will make vscode ask you to reopen in container\r\n## Stop and Cleanup\r\n\r\nTo stop the containers and remove the network:\r\n\r\n```bash\r\ndocker compose down\r\n```\r\n\r\n## Contributing\r\n\r\nWe welcome contributions! If you'd like to contribute to the Ollama Docker Compose Setup, please follow our [Contribution Guidelines](CONTRIBUTING.md).\r\n\r\n\r\n## License\r\n\r\nThis project is licensed under the [RSOSL](LICENSE). Feel free to use, modify, and distribute it according to the terms of the license. Just give me a mention and some credit\r\n\r\n## Contact\r\n\r\nIf you have any questions or concerns, please contact us at [vantlynxz@gmail.com](mailto:vantlynxz@gmail.com).\r\n\r\nEnjoy using Ollama with Docker Compose! 🐳🚀\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliantlynx%2Follama-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaliantlynx%2Follama-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaliantlynx%2Follama-docker/lists"}