Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

Feat: Add flatpak manifest (#4732)

Akarshan Biswas1d4a6a72eddf
diff --git a/flatpak/ai.jan.Jan.metainfo.xml b/flatpak/ai.jan.Jan.metainfo.xml
new file mode 100644
index 000000000..510eb5633
--- /dev/null
+++ b/flatpak/ai.jan.Jan.metainfo.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop-application">
+ <id>ai.jan.Jan</id>
+ <metadata_license>FSFAP</metadata_license>
+ <project_license>AGPL-3.0-only</project_license>
+ <developer_name>Menlo Research</developer_name>
+ <name>Jan</name>
+ <icon type="stock">ai.jan.Jan</icon>
+ <summary>Local AI Assistant that runs 100% offline on your device</summary>
+ <categories>
+ <category>Utility</category>
+ <category>Education</category>
+ <category>Chat</category>
+ <category>Dictionary</category>
+ </categories>
+ <description>
+ <p>
+ Jan is a ChatGPT-alternative that runs 100% offline on your device. Our goal is to make it easy for anyone to download and run LLMs and use AI with full control and privacy.
+ </p>
+ <p>Features:</p>
+ <ul>
+ <li>Model Library with popular LLMs like Llama, Gemma, Mistral, or Qwen</li>
+ <li>Connect to Remote AI APIs like Groq and OpenRouter</li>
+ <li>Local API Server with OpenAI-equivalent API</li>
+ <li>Extensions for customizing Jan</li>
+ </ul>
+ </description>
+<launchable type="desktop-id">ai.jan.Jan.desktop</launchable>
+<screenshots>
+ <screenshot type="default">
+ <image>https://catalog.jan.ai/flatpak/demo.gif</image>
+ </screenshot>
+</screenshots>
+
+<url type="homepage">https://jan.ai/</url>
+<url type="bugtracker">https://github.com/janhq/jan/issues</url>
+
+<content_rating type="oars-1.1" />
+
+<releases>
+ <release version="0.5.12" date="2024-01-02">
+ <description>
+ <p>Latest stable release of Jan AI</p>
+ </description>
+ </release>
+</releases>
+</component>
diff --git a/flatpak/ai.jan.Jan.yml b/flatpak/ai.jan.Jan.yml
new file mode 100644
index 000000000..bf27cb6ce
--- /dev/null
+++ b/flatpak/ai.jan.Jan.yml
@@ -0,0 +1,118 @@
+id: ai.jan.Jan
+runtime: org.gnome.Platform
+runtime-version: '48'
+sdk: org.gnome.Sdk
+command: Jan
+finish-args:
+ - --socket=wayland # Permission needed to show the window
+ - --socket=fallback-x11 # Permission needed to show the window on X11
+ - --device=dri
+ - --share=ipc
+ - --share=network
+ - --socket=pulseaudio # for future multimodality
+ - --filesystem=xdg-run/dconf
+ - --filesystem=~/.config/dconf:ro
+ - --filesystem=~/.config/kioslaverc
+ - --env=GTK_PATH=/app/lib/gtkmodules
+
+modules:
+ - name: volk
+ buildsystem: cmake-ninja
+ builddir: true
+ config-opts:
+ - -DVOLK_INSTALL=ON
+ sources:
+ - type: archive
+ url: https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-1.3.280.0.zip
+ sha256: 178875134d36e8b90f7e3ec31171355df3b71f47eba49cca2f98158e6552b011
+
+ - name: vulkan-headers
+ buildsystem: cmake-ninja
+ builddir: true
+ sources:
+ - type: archive
+ url: https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.283.zip
+ sha256: 2094159c87fb4b6d8f734bd4cad59564cef7ef32feb00cf6d8ca7e75a84df921
+
+ - name: vulkan-tools
+ buildsystem: cmake-ninja
+ builddir: true
+ sources:
+ - type: archive
+ url: https://github.com/KhronosGroup/Vulkan-Tools/archive/refs/tags/v1.3.283.zip
+ sha256: 11ec6b474e91dc8cb6e7f22891294ede549bb6ed67c19d230e293b3fc9610883
+
+ - name: shaderc
+ buildsystem: cmake-ninja
+ builddir: true
+ config-opts:
+ - -DSHADERC_SKIP_COPYRIGHT_CHECK=ON
+ - -DSHADERC_SKIP_EXAMPLES=ON
+ - -DSHADERC_SKIP_TESTS=ON
+ - -DSPIRV_SKIP_EXECUTABLES=ON
+ - -DENABLE_GLSLANG_BINARIES=OFF
+ cleanup:
+ - /bin
+ - /include
+ - /lib/cmake
+ - /lib/pkgconfig
+ sources:
+ - type: git
+ url: https://github.com/google/shaderc.git
+ tag: v2024.1
+ commit: 47a9387ef5b3600d30d84c71ec77a59dc7db46fa
+ # https://github.com/google/shaderc/blob/known-good/known_good.json
+ - type: git
+ url: https://github.com/KhronosGroup/SPIRV-Tools.git
+ commit: dd4b663e13c07fea4fbb3f70c1c91c86731099f7
+ dest: third_party/spirv-tools
+ - type: git
+ url: https://github.com/KhronosGroup/SPIRV-Headers.git
+ commit: 5e3ad389ee56fca27c9705d093ae5387ce404df4
+ dest: third_party/spirv-headers
+ - type: git
+ url: https://github.com/KhronosGroup/glslang.git
+ commit: 142052fa30f9eca191aa9dcf65359fcaed09eeec
+ dest: third_party/glslang
+
+ - name: cuda-toolkit
+ only-arches:
+ - x86_64
+ cleanup:
+ - /cuda
+ buildsystem: simple
+ build-commands:
+ - mkdir /app/cuda
+ - sh cuda_toolkit.run --silent --toolkit --toolkitpath=/app/cuda
+ - mv /app/cuda/lib64/libcudart.* /app/lib/
+ - mv /app/cuda/lib64/libcublas* /app/lib/
+ sources:
+ - type: file
+ only-arches:
+ - x86_64
+ url: https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_570.86.10_linux.run
+ dest-filename: cuda_toolkit.run
+ md5: c71027cf1a4ce84f80b9cbf81116e767
+
+ - name: binary
+ buildsystem: simple
+ sources:
+ - type: file
+ url: https://catalog.jan.ai/flatpak/Jan_0.6.8_amd64.deb
+ sha256: 15d1368c318a3853bad4fc3646f88afdbf9f52b6416a4734f7a297741d171f28
+ only-arches: [x86_64]
+ - type: file
+ path: ai.jan.Jan.metainfo.xml
+ build-commands:
+ - ar -x *.deb
+ - tar -xf data.tar.gz
+ - 'install -Dm755 usr/bin/Jan /app/bin/Jan'
+ - 'install -Dm755 usr/bin/bun /app/bin/bun'
+ - 'install -Dm755 usr/bin/uv /app/bin/uv'
+ - cp -rv usr/lib/* /app/lib/.
+ - install -Dm644 usr/share/applications/Jan.desktop /app/share/applications/ai.jan.Jan.desktop
+ - sed -e 's/Icon=Jan/Icon=ai.jan.Jan/g' -e 's#Exec=Jan#Exec=/app/bin/Jan#g' -i /app/share/applications/ai.jan.Jan.desktop
+ - install -Dm644 usr/share/icons/hicolor/128x128/apps/Jan.png /app/share/icons/hicolor/128x128/apps/ai.jan.Jan.png
+ - install -Dm644 usr/share/icons/hicolor/32x32/apps/Jan.png /app/share/icons/hicolor/32x32/apps/ai.jan.Jan.png
+ - install -Dm644 usr/share/icons/hicolor/256x256@2/apps/Jan.png /app/share/icons/hicolor/256x256@2/apps/ai.jan.Jan.png
+ - install -Dm644 ai.jan.Jan.metainfo.xml /app/share/metainfo/ai.jan.Jan.rosary.metainfo.xml