Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snap: improve the snap #318

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
snap: improve the snap
1. cleaned up the manifest
2. added arm64 support
  • Loading branch information
soumyaDghosh committed Sep 20, 2024
commit 4fe0956fbd8a6325c7230842c45a40704ab3209c
9 changes: 0 additions & 9 deletions snap/gui/alpaca.desktop

This file was deleted.

150 changes: 0 additions & 150 deletions snap/gui/com.jeffser.Alpaca.svg

This file was deleted.

44 changes: 13 additions & 31 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
name: alpaca
base: core24
adopt-info: alpaca
summary: An Ollama client made with GTK4 and Adwaita
description: |
Alpaca is an Ollama client where you can manage and chat with multiple models,
Alpaca provides an easy and begginer friendly way of interacting with local AI,
everything is open source and powered by Ollama.

platforms:
amd64:
arm64:

confinement: strict
grade: stable
Expand All @@ -23,21 +19,14 @@ slots:
apps:
alpaca:
command: usr/bin/alpaca
desktop: meta/gui/alpaca.desktop
common-id: com.jeffser.Alpaca
extensions:
- gnome
plugs:
- network
- network-bind
- desktop
- desktop-legacy
- wayland
- opengl
- home
- removable-media
slots:
- dbus-alpaca

ollama:
command: bin/ollama
Expand All @@ -46,7 +35,6 @@ apps:
- removable-media
- network
- network-bind
- opengl

ollama-daemon:
command: bin/ollama serve
Expand All @@ -58,7 +46,6 @@ apps:
- removable-media
- network
- network-bind
- opengl

parts:
# Python dependencies
Expand All @@ -75,7 +62,9 @@ parts:
# Ollama plugin
ollama:
plugin: dump
source: https://github.com/ollama/ollama/releases/download/v0.3.10/ollama-linux-amd64.tgz
source:
- on amd64: https://github.com/ollama/ollama/releases/download/v0.3.10/ollama-linux-amd64.tgz
- on arm64: https://github.com/ollama/ollama/releases/download/v0.3.10/ollama-linux-arm64.tgz

# Alpaca app
alpaca:
Expand All @@ -86,26 +75,19 @@ parts:
source-depth: 1
meson-parameters:
- --prefix=/snap/alpaca/current/usr
build-packages:
- meson
- ninja-build
- pkg-config
- libcairo2-dev
- libgtk-3-dev
- libglib2.0-dev
- gettext
- desktop-file-utils
- appstream
override-pull: |
craftctl default
craftctl set version=$(git describe --tags --abbrev=0)
override-build: |
craftctl default
sed -i '1c#!/usr/bin/env python3' $CRAFT_PART_INSTALL/snap/alpaca/current/usr/bin/alpaca
stage-packages:
- libnuma1
parse-info:
- usr/share/metainfo/com.jeffser.Alpaca.metainfo.xml
organize:
snap/alpaca/current/usr: usr
snap/alpaca/current: .
after: [python-deps]

deps:
plugin: nil
after: [alpaca]
stage-packages:
- libnuma1
prime:
- usr/lib/*/libnuma.so.1*