Skip to content

Commit 1d4a6a7

Browse files
Feat: Add flatpak manifest (#4732)
* Chore: Add flatpak manifest * Update flatpak to new release * update * Update to 0.6.7 * re-enable cuda toolkit * add uv to manifest and remove unused yml file * fixup python3-uv * fix uv installation * Update template to 0.6.8 * chore: update sha256 for .deb --------- Co-authored-by: Nguyen Ngoc Minh <[email protected]>
1 parent 298f408 commit 1d4a6a7

File tree

2 files changed

+165
-0
lines changed

2 files changed

+165
-0
lines changed

flatpak/ai.jan.Jan.metainfo.xml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<component type="desktop-application">
3+
<id>ai.jan.Jan</id>
4+
<metadata_license>FSFAP</metadata_license>
5+
<project_license>AGPL-3.0-only</project_license>
6+
<developer_name>Menlo Research</developer_name>
7+
<name>Jan</name>
8+
<icon type="stock">ai.jan.Jan</icon>
9+
<summary>Local AI Assistant that runs 100% offline on your device</summary>
10+
<categories>
11+
<category>Utility</category>
12+
<category>Education</category>
13+
<category>Chat</category>
14+
<category>Dictionary</category>
15+
</categories>
16+
<description>
17+
<p>
18+
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.
19+
</p>
20+
<p>Features:</p>
21+
<ul>
22+
<li>Model Library with popular LLMs like Llama, Gemma, Mistral, or Qwen</li>
23+
<li>Connect to Remote AI APIs like Groq and OpenRouter</li>
24+
<li>Local API Server with OpenAI-equivalent API</li>
25+
<li>Extensions for customizing Jan</li>
26+
</ul>
27+
</description>
28+
<launchable type="desktop-id">ai.jan.Jan.desktop</launchable>
29+
<screenshots>
30+
<screenshot type="default">
31+
<image>https://catalog.jan.ai/flatpak/demo.gif</image>
32+
</screenshot>
33+
</screenshots>
34+
35+
<url type="homepage">https://jan.ai/</url>
36+
<url type="bugtracker">https://github.com/janhq/jan/issues</url>
37+
38+
<content_rating type="oars-1.1" />
39+
40+
<releases>
41+
<release version="0.5.12" date="2024-01-02">
42+
<description>
43+
<p>Latest stable release of Jan AI</p>
44+
</description>
45+
</release>
46+
</releases>
47+
</component>

flatpak/ai.jan.Jan.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
id: ai.jan.Jan
2+
runtime: org.gnome.Platform
3+
runtime-version: '48'
4+
sdk: org.gnome.Sdk
5+
command: Jan
6+
finish-args:
7+
- --socket=wayland # Permission needed to show the window
8+
- --socket=fallback-x11 # Permission needed to show the window on X11
9+
- --device=dri
10+
- --share=ipc
11+
- --share=network
12+
- --socket=pulseaudio # for future multimodality
13+
- --filesystem=xdg-run/dconf
14+
- --filesystem=~/.config/dconf:ro
15+
- --filesystem=~/.config/kioslaverc
16+
- --env=GTK_PATH=/app/lib/gtkmodules
17+
18+
modules:
19+
- name: volk
20+
buildsystem: cmake-ninja
21+
builddir: true
22+
config-opts:
23+
- -DVOLK_INSTALL=ON
24+
sources:
25+
- type: archive
26+
url: https://github.com/zeux/volk/archive/refs/tags/vulkan-sdk-1.3.280.0.zip
27+
sha256: 178875134d36e8b90f7e3ec31171355df3b71f47eba49cca2f98158e6552b011
28+
29+
- name: vulkan-headers
30+
buildsystem: cmake-ninja
31+
builddir: true
32+
sources:
33+
- type: archive
34+
url: https://github.com/KhronosGroup/Vulkan-Headers/archive/refs/tags/v1.3.283.zip
35+
sha256: 2094159c87fb4b6d8f734bd4cad59564cef7ef32feb00cf6d8ca7e75a84df921
36+
37+
- name: vulkan-tools
38+
buildsystem: cmake-ninja
39+
builddir: true
40+
sources:
41+
- type: archive
42+
url: https://github.com/KhronosGroup/Vulkan-Tools/archive/refs/tags/v1.3.283.zip
43+
sha256: 11ec6b474e91dc8cb6e7f22891294ede549bb6ed67c19d230e293b3fc9610883
44+
45+
- name: shaderc
46+
buildsystem: cmake-ninja
47+
builddir: true
48+
config-opts:
49+
- -DSHADERC_SKIP_COPYRIGHT_CHECK=ON
50+
- -DSHADERC_SKIP_EXAMPLES=ON
51+
- -DSHADERC_SKIP_TESTS=ON
52+
- -DSPIRV_SKIP_EXECUTABLES=ON
53+
- -DENABLE_GLSLANG_BINARIES=OFF
54+
cleanup:
55+
- /bin
56+
- /include
57+
- /lib/cmake
58+
- /lib/pkgconfig
59+
sources:
60+
- type: git
61+
url: https://github.com/google/shaderc.git
62+
tag: v2024.1
63+
commit: 47a9387ef5b3600d30d84c71ec77a59dc7db46fa
64+
# https://github.com/google/shaderc/blob/known-good/known_good.json
65+
- type: git
66+
url: https://github.com/KhronosGroup/SPIRV-Tools.git
67+
commit: dd4b663e13c07fea4fbb3f70c1c91c86731099f7
68+
dest: third_party/spirv-tools
69+
- type: git
70+
url: https://github.com/KhronosGroup/SPIRV-Headers.git
71+
commit: 5e3ad389ee56fca27c9705d093ae5387ce404df4
72+
dest: third_party/spirv-headers
73+
- type: git
74+
url: https://github.com/KhronosGroup/glslang.git
75+
commit: 142052fa30f9eca191aa9dcf65359fcaed09eeec
76+
dest: third_party/glslang
77+
78+
- name: cuda-toolkit
79+
only-arches:
80+
- x86_64
81+
cleanup:
82+
- /cuda
83+
buildsystem: simple
84+
build-commands:
85+
- mkdir /app/cuda
86+
- sh cuda_toolkit.run --silent --toolkit --toolkitpath=/app/cuda
87+
- mv /app/cuda/lib64/libcudart.* /app/lib/
88+
- mv /app/cuda/lib64/libcublas* /app/lib/
89+
sources:
90+
- type: file
91+
only-arches:
92+
- x86_64
93+
url: https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda_12.8.0_570.86.10_linux.run
94+
dest-filename: cuda_toolkit.run
95+
md5: c71027cf1a4ce84f80b9cbf81116e767
96+
97+
- name: binary
98+
buildsystem: simple
99+
sources:
100+
- type: file
101+
url: https://catalog.jan.ai/flatpak/Jan_0.6.8_amd64.deb
102+
sha256: 15d1368c318a3853bad4fc3646f88afdbf9f52b6416a4734f7a297741d171f28
103+
only-arches: [x86_64]
104+
- type: file
105+
path: ai.jan.Jan.metainfo.xml
106+
build-commands:
107+
- ar -x *.deb
108+
- tar -xf data.tar.gz
109+
- 'install -Dm755 usr/bin/Jan /app/bin/Jan'
110+
- 'install -Dm755 usr/bin/bun /app/bin/bun'
111+
- 'install -Dm755 usr/bin/uv /app/bin/uv'
112+
- cp -rv usr/lib/* /app/lib/.
113+
- install -Dm644 usr/share/applications/Jan.desktop /app/share/applications/ai.jan.Jan.desktop
114+
- 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
115+
- install -Dm644 usr/share/icons/hicolor/128x128/apps/Jan.png /app/share/icons/hicolor/128x128/apps/ai.jan.Jan.png
116+
- install -Dm644 usr/share/icons/hicolor/32x32/apps/Jan.png /app/share/icons/hicolor/32x32/apps/ai.jan.Jan.png
117+
- install -Dm644 usr/share/icons/hicolor/256x256@2/apps/Jan.png /app/share/icons/hicolor/256x256@2/apps/ai.jan.Jan.png
118+
- install -Dm644 ai.jan.Jan.metainfo.xml /app/share/metainfo/ai.jan.Jan.rosary.metainfo.xml

0 commit comments

Comments
 (0)