Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds strictly confined snap packaging for x86-64 (
and arm64just x86-64 for starters, looks like this needs overall a bit of love inollama
), presently published on the channellatest/beta
. This is a nice alternative to docker (no need to install and configure the nvidia docker runtime for example, systemd service is set up automatically, over-the-air updates, straightforward to access resources and data from user's host system within the limits of the application's confinement) and safer than bare installation onto host system with the shell script that some users might not want to go ahead with (strict confinement ~= containerised analogously to docker from the host system).Installable with:
network
,network-bind
,home
,removable-media
,opengl
interfaces in use, i.e. it can access and serve a port, access home directory and/media
, and access the GPU (theopengl
interface also grants access to CUDA etc).ollama serve
./media
),sudo snap connect ollama:removable-media
(for security reasons, removable media access not granted without user action).If this looks interesting, I'm happy to hand over the package on snapcraft.io to an ollama maintainer, and can contribute CI integration to make it easy to keep the snap package up to date whenever you release.
If you want to build this locally, after installing
snapcraft
and either the multipass or LXD provider for it go to the root directory of the repository, and ...:Configuration
sudo snap set ollama host=0.0.0.0:12345
(changing the config value will automatically restart the systemd service)sudo snap set ollama models=/your/preferred/path/to/your/models
(changing the config value will automatically restart the service)ollama
from the shell, automatically calls it withOLLAMA_HOST
andOLLAMA_MODELS
set based on above configuration (i.e. no need for setting these inbashrc
etc).