ImageTagger/flatpak/dev.nuculabs.ImageTagger.yaml

49 lines
1.7 KiB
YAML
Raw Normal View History

2024-05-03 15:39:30 +00:00
id: dev.nuculabs.ImageTagger
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
2024-11-17 20:11:29 +00:00
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk17
command: /app/bin/ImageTagger/bin/ImageTagger
2024-05-03 15:39:30 +00:00
finish-args:
# X11 + XShm access
- --share=ipc
- --socket=fallback-x11
# Wayland access
2024-11-17 20:11:29 +00:00
- --socket=wayland
2024-05-03 15:39:30 +00:00
# GPU acceleration if needed
- --device=dri
# Needs to save files locally
- --filesystem=xdg-pictures
modules:
- name: ImageTagger
buildsystem: simple
2024-11-17 20:11:29 +00:00
build-options:
env:
PATH: /app/bin:/usr/bin:/usr/lib/sdk/openjdk17/bin
JAVA_HOME: /usr/lib/sdk/openjdk17/jvm/openjdk-17
build-args:
- --share=network
2024-05-03 15:39:30 +00:00
build-commands:
2024-11-17 20:11:29 +00:00
- cp prediction.onnx img-ai/src/main/resources/dev/nuculabs/imagetagger/ai/
- cp prediction_categories.txt img-ai/src/main/resources/dev/nuculabs/imagetagger/ai/
- gradle jpackageImage
- mkdir -p /app/bin/
# Copy ImageTagger folder to /app/bin
- ls img-ui/build/jpackage
- cp -R img-ui/build/jpackage/ImageTagger /app/bin/
- ls /app/bin/
2024-05-03 15:39:30 +00:00
# Desktop Integration
- mkdir -p bin /app/share/{applications,icons/hicolor/512x512/apps,metainfo}
2024-05-03 15:39:30 +00:00
- mv ${FLATPAK_ID}.desktop /app/share/applications/${FLATPAK_ID}.desktop
2024-05-11 12:40:58 +00:00
- mv ${FLATPAK_ID}.png /app/share/icons/hicolor/512x512/apps/${FLATPAK_ID}.png
2024-05-03 15:39:30 +00:00
sources:
2024-11-17 20:11:29 +00:00
- type: git
url: https://github.com/dnutiu/ImageTagger
2024-05-03 15:39:30 +00:00
- type: archive
2024-11-17 20:11:29 +00:00
url: https://github.com/dnutiu/ImageTagger/releases/download/v1/AIModels.zip
sha256: "bbe80bf135621897bc6186d8f17b889064717ed3b9951702b33be869e522321c"
2024-05-03 15:39:30 +00:00
- type: file
path: dev.nuculabs.ImageTagger.png
- type: file
path: dev.nuculabs.ImageTagger.desktop