Coder Social home page Coder Social logo

senad96 / ollama-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from valiantlynx/ollama-docker

0.0 0.0 0.0 59 KB

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

Home Page: https://ollama-docker.azurewebsites.net/

Shell 7.14% Python 44.93% HTML 42.02% Batchfile 1.87% Dockerfile 4.06%

ollama-docker's Introduction

Ollama Docker Compose Setup

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.

Getting Started

Prerequisites

Make sure you have the following prerequisites installed on your machine:

  • Docker
  • Docker Compose

GPU Support (Optional)

If you have a GPU and want to leverage its power within a Docker container, follow these steps to install the NVIDIA Container Toolkit:

curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
  && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
    sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
    sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit

# Configure NVIDIA Container Toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker

# Test GPU integration
docker run --gpus all nvidia/cuda:11.5.2-base-ubuntu20.04 nvidia-smi

Configuration

  1. Clone the Docker Compose repository:

    git clone https://github.com/valiantlynx/ollama-docker.git
  2. Change to the project directory:

    cd ollama-docker

Usage

Start Ollama and its dependencies using Docker Compose:

if gpu is configured

docker-compose -f docker-compose-ollama-gpu.yaml up -d

else

docker-compose up -d

Visit http://localhost:8000 in your browser to access Ollama-webui.

Model Installation

Navigate to settings -> model and install a model (e.g., llama2). This may take a couple of minutes, but afterward, you can use it just like ChatGPT.

Explore Langchain and Ollama

You 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.

Devcontainer and Virtual Environment

The 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. if 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

Stop and Cleanup

To stop the containers and remove the network:

docker-compose down

Contributing

We welcome contributions! If you'd like to contribute to the Ollama Docker Compose Setup, please follow our Contribution Guidelines.

License

This project is licensed under the MIT License. Feel free to use, modify, and distribute it according to the terms of the license. Just give me a mention and some credit

Contact

If you have any questions or concerns, please contact us at [email protected].

Enjoy using Ollama with Docker Compose! 🐳🚀

ollama-docker's People

Contributors

valiantlynx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.