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!
- 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.
- 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
- Make the script executable:
chmod +x ollama.sh
- (Optional) Move the script to a directory in your
PATH
to access it from anywhere:sudo mv ollama.sh /usr/local/bin/ollama
To run the script, use the following syntax:
./ollama.sh [command]
Or if you moved it to /usr/local/bin
, simply:
ollama [command]
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.comdeletemodel
- delete model from the container's volume.
- 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
- 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.
Contributions are welcome! If you have ideas for additional features or improvements, feel free to fork the repository and submit a pull request.
No license
Thanks to the open-source community for the continuous inspiration and support.