94 lines
1.8 KiB
YAML
94 lines
1.8 KiB
YAML
name: jeffser-alpaca
|
|
base: core24
|
|
adopt-info: alpaca
|
|
|
|
platforms:
|
|
amd64:
|
|
arm64:
|
|
|
|
confinement: strict
|
|
grade: stable
|
|
compression: lzo
|
|
|
|
slots:
|
|
dbus-alpaca:
|
|
interface: dbus
|
|
bus: session
|
|
name: com.jeffser.Alpaca
|
|
|
|
apps:
|
|
alpaca:
|
|
command: usr/bin/alpaca
|
|
common-id: com.jeffser.Alpaca
|
|
extensions:
|
|
- gnome
|
|
plugs:
|
|
- network
|
|
- network-bind
|
|
- home
|
|
- removable-media
|
|
|
|
ollama:
|
|
command: bin/ollama
|
|
plugs:
|
|
- home
|
|
- removable-media
|
|
- network
|
|
- network-bind
|
|
|
|
ollama-daemon:
|
|
command: bin/ollama serve
|
|
daemon: simple
|
|
install-mode: enable
|
|
restart-condition: on-failure
|
|
plugs:
|
|
- home
|
|
- removable-media
|
|
- network
|
|
- network-bind
|
|
|
|
parts:
|
|
# Python dependencies
|
|
python-deps:
|
|
plugin: python
|
|
source: .
|
|
python-packages:
|
|
- requests==2.31.0
|
|
- pillow==10.3.0
|
|
- pypdf==4.2.0
|
|
- pytube==15.0.0
|
|
- html2text==2024.2.26
|
|
|
|
# Ollama plugin
|
|
ollama:
|
|
plugin: dump
|
|
source:
|
|
- on amd64: https://github.com/ollama/ollama/releases/download/v0.3.12/ollama-linux-amd64.tgz
|
|
- on arm64: https://github.com/ollama/ollama/releases/download/v0.3.12/ollama-linux-arm64.tgz
|
|
|
|
# Alpaca app
|
|
alpaca:
|
|
plugin: meson
|
|
source-type: git
|
|
source: https://github.com/Jeffser/Alpaca.git
|
|
source-tag: 2.6.5
|
|
source-depth: 1
|
|
meson-parameters:
|
|
- --prefix=/snap/alpaca/current/usr
|
|
override-build: |
|
|
craftctl default
|
|
sed -i '1c#!/usr/bin/env python3' $CRAFT_PART_INSTALL/snap/alpaca/current/usr/bin/alpaca
|
|
parse-info:
|
|
- usr/share/metainfo/com.jeffser.Alpaca.metainfo.xml
|
|
organize:
|
|
snap/alpaca/current: .
|
|
after: [python-deps]
|
|
|
|
deps:
|
|
plugin: nil
|
|
after: [alpaca]
|
|
stage-packages:
|
|
- libnuma1
|
|
prime:
|
|
- usr/lib/*/libnuma.so.1*
|