Skip to content

A simple and efficient command-line tool to manage your Ollama Docker container with ease. This script allows you to start, stop, update, and restart your Ollama container, as well as manage models directly from the command line.

Notifications You must be signed in to change notification settings

SebDominguez/Ollama-Container-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

This README provides a quick overview of the script’s functionality, usage examples, and setup instructions. It’s perfect for anyone looking to streamline the management of their Ollama Docker container!


Features

  • Start the Ollama Docker container with a single command.
  • Stop the container when it’s no longer needed.
  • Update the container or its models with ease.
  • Restart the container for a fresh start or to apply updates.
  • List available models inside the container for quick management.

Installation

  1. Clone the repository or download the script and the docker-compose file directly:
    curl -O https://raw.githubusercontent.com/SebDominguez/Ollama-Container-Helper/refs/heads/master/ollama.sh -O https://raw.githubusercontent.com/SebDominguez/Ollama-Container-Helper/refs/heads/master/docker-compose.yml
  2. Make the script executable:
    chmod +x ollama.sh
  3. (Optional) Move the script to a directory in your PATH to access it from anywhere:
    sudo mv ollama.sh /usr/local/bin/ollama

Usage

To run the script, use the following syntax:

./ollama.sh [command]

Or if you moved it to /usr/local/bin, simply:

ollama [command]

Available Commands

start stop update pullmodel listmodel deletemodel

  • start - Start the Ollama container.
  • stop - Stop the container.
  • update - Update the container or its models.
  • restart - Restart the container.
  • listmodel - List all available models within the container.
  • pullmodel - Pull a specific model from the ollama.com
  • deletemodel - delete model from the container's volume.

Examples

  • Start the container:
    ./ollama.sh start
  • Stop the container:
    ./ollama.sh stop
  • Update the container or models:
    ./ollama.sh update
  • Restart the container:
    ./ollama.sh restart
  • List available models:
    ./ollama.sh listmodel

Prerequisites

  • Docker: Ensure docker is installed and running on your machine. You can install it by following the official Docker installation guide.
  • Docker Compose: Make sure docker-compose is installed as well. Instructions can be found here.

Contributing

Contributions are welcome! If you have ideas for additional features or improvements, feel free to fork the repository and submit a pull request.

License

No license

Acknowledgments

Thanks to the open-source community for the continuous inspiration and support.

About

A simple and efficient command-line tool to manage your Ollama Docker container with ease. This script allows you to start, stop, update, and restart your Ollama container, as well as manage models directly from the command line.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages