gpt4all icon indicating copy to clipboard operation
gpt4all copied to clipboard

Create a Flatpak package

Open vardidze-rostom opened this issue 1 year ago • 21 comments

Feature request

Hello comrades, please create a flatpak package so that your program can run on all Linux distributions.

Motivation

I like Fedora Linux, but I would like to run your program without using a VM

Your contribution

I am sure that if you create a Flatpak package, your program will be more famous!

vardidze-rostom avatar May 23 '23 15:05 vardidze-rostom

I use arch, opensuse, fedora. Flatpak package is cross linux. Ubuntu package it's for a ubuntu and perhaps debian

keybasegit avatar May 23 '23 18:05 keybasegit

As far as I can tell, the installer is not exactly an Ubuntu package, but I think it was compiled on an Ubuntu 22.04 desktop machine.

It packages a few libraries itself, so you might still be able to run it on other distros, although I haven't tried that myself.

Maybe give it a go and report back whether it works?

cosmic-snow avatar May 23 '23 20:05 cosmic-snow

It does work, just installed and am running the latest version on Fedora 38. Nonetheless, if user-friendliness is a goal of the project, and from my understanding it is, creating a flatpak package and distributing it through flathub is a great idea and would be my preferred way to get this software.

Not only will this increase discoverability, seeing as lots of distros ship with flathub enabled out of the box nowadays, and the user will be able to stumble upon it through their graphical package manager of choice, it's also friendlier because it integrates with the package management, allowing the user to update it just like they update the rest of their other apps/packages.

There's also increased compatibility through the entire linux eco-system. Nowadays the installer is working for me on Fedora 38, but just a while ago it wasn't because of some library incompatibility, this now has been fixed but with the current distribution method these problems may keep happening again down the road. Distributing it as a flatpak fixes this issue, the developers have complete control of the dependencies/libraries and can not only bundle everything they need but also update it when needed. It guarantees a stronger reliability/sense of security that the program will just work on whatever distro supports flatpak, and that's a lot of them.

So it would be really great if this was packaged as a flatpak and distributed through flathub.

Edit: Case in point, while it does install now in Fedora the localdocs plugin can't be used because of a bug in the browse button for setting up collections, due to a missing dependency. The only workaround I found for it was for ubuntu.

Arbitrate3280 avatar Jun 02 '23 21:06 Arbitrate3280

So it would be really great if this was packaged as a flatpak and distributed through flathub.

Completely agree. I hope you didn't take my comment as being against a flatpak version of the project.

cosmic-snow avatar Jun 03 '23 07:06 cosmic-snow

I created a manifest to build a flatpak version. You can find it here.

Tim453 avatar Jun 11 '23 13:06 Tim453

Thanks a lot Tim453. I tried it - and got always an error message Can't parse 'com.github.gpt4all.yml': 30:68: mapping values are not allowed in this context. Any hint to resolve it is highly appreciated.

nonameuser-de avatar Jul 04 '23 08:07 nonameuser-de

I have decided to maintain a build at flathub. Already tested but we need a better appdata.xml before proceeding. I am using @Tim453 's appdata but we are missing screenshots. If anyone want to help me. Please don't hesitate to do so. Thank you.

edit: the app id should be io.gpt4all.gpt4all imo.

qnixsynapse avatar Jul 17 '23 08:07 qnixsynapse

Awesome! I really want this too :-)

niansa avatar Aug 14 '23 11:08 niansa

Flat hub submission would be nice, the .run file is working on VanillaOS (Ubuntu) but doesn't show a desktop icon

jacobgonzales20 avatar Aug 23 '23 17:08 jacobgonzales20

I could not get gpt4all installed on Ubuntu 20 LTS...

Installer ran, but what then? Am I supposed to run /bin/chat or something? It's gives: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found

Thanks to @Tim453 for the flatpak. That got it installed and working However, the LocalDocs isn't working.... it only lets my choose my home directory, not another directory

decentropy avatar Aug 24 '23 00:08 decentropy

I could not get gpt4all installed on Ubuntu 20 LTS...

Installer ran, but what then? Am I supposed to run /bin/chat or something? It's gives: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found

Thanks to @Tim453 for the flatpak. That got it installed and working However, the LocalDocs isn't working.... it only lets my choose my home directory, not another directory

Try, right-clicking then press create executable then run it

jacobgonzales20 avatar Aug 25 '23 05:08 jacobgonzales20

I agree that this should be done. Install scripts are rarely, if ever, used on linux and for good reason. They're less secure since they're uploaded indiscriminantly, more vulnerable to malicious code injection, (i.e. someone putting a virus in the install script and then spreading it around as the official installer) and lack sandboxing. Native packaging should be an option, but if resources are limited it's definitely preferable to have a universal flatpak compared to an install script.

TheOverpassArsonist avatar Aug 30 '23 12:08 TheOverpassArsonist

I agree that this should be done. Install scripts are rarely, if ever, used on linux and for good reason. They're less secure since they're uploaded indiscriminantly, more vulnerable to malicious code injection, (i.e. someone putting a virus in the install script and then spreading it around as the official installer) and lack sandboxing. Native packaging should be an option, but if resources are limited it's definitely preferable to have a universal flatpak compared to an install script.

Plus Flatpak on flathub = more downloads due to it being shipped by default on most distros

jacobgonzales20 avatar Aug 30 '23 15:08 jacobgonzales20

I created a manifest to build a flatpak version. You can find it here.

Your flatpack worked for a bit but then started to crash after a day or so. I am on Zorin OS. I tried the installer but I don't have a high enough version of sql light or something. If it wasn't that, my version of python is too low. I hope a flatpak gets made for this.

Jacobthegr8 avatar Oct 11 '23 19:10 Jacobthegr8

Flat hub submission would be nice, the .run file is working on VanillaOS (Ubuntu) but doesn't show a desktop icon

I needed to right click the icon and select "allow executing file as a program" for it to work.

Jacobthegr8 avatar Oct 11 '23 19:10 Jacobthegr8

Updates?

goliv04053 avatar Jan 14 '24 14:01 goliv04053

I am working on Alt Linux, Ubuntu installer do not work. I think this will be great to make flatpack version!

DmitrijOkeanij avatar Feb 08 '24 15:02 DmitrijOkeanij

The test version of Flatpak works for some, but others get pgp signature related errors:

    [2] com.canonical.AppMenu.Registrar, org.kde.KGlobalSettings, org.kde.kconfig.notify


        ID                                                          Branch                   Op              Remote                      Download
 1. [✗] io.gpt4all.gpt4all.Locale                                   test                     i               gpt4all-origin                1.0 kB / 61.0 MB
 2. [✓] org.freedesktop.Platform.GL.default                         23.08                    i               flathub                     164.3 MB / 164.6 MB
 3. [✓] org.freedesktop.Platform.GL.default                         23.08-extra              i               flathub                      18.5 MB / 164.6 MB
 4. [✓] org.freedesktop.Platform.GL.nvidia-550-78                   1.4                      i               flathub                     307.7 MB / 307.8 MB
 5. [✓] org.freedesktop.Platform.VAAPI.Intel                        23.08                    i               flathub                      13.3 MB / 13.4 MB
 6. [✓] org.freedesktop.Platform.openh264                           2.2.0                    i               flathub                     886.7 kB / 944.3 kB
 7. [✓] org.kde.Platform.Locale                                     6.7                      i               flathub                      18.0 kB / 380.7 MB
 8. [✓] org.kde.WaylandDecoration.QAdwaitaDecorations               6.7                      i               flathub                       1.2 MB / 1.2 MB
 9. [✓] org.kde.Platform                                            6.7                      i               flathub                     259.4 MB / 326.9 MB
10. [✗] io.gpt4all.gpt4all                                          test                     i               gpt4all-origin              228.0 MB / 510.2 MB

Warning: While pulling runtime/io.gpt4all.gpt4all.Locale/x86_64/test from remote gpt4all-origin: Commit 16dbe04e4f4623e06b40bf10dbbdd8bd67246bdc6e31753e4e592f844083f08a: GPG verification enabled, but no signatures found (use gpg-verify=false in remote config to disable)
Error: While pulling app/io.gpt4all.gpt4all/x86_64/test from remote gpt4all-origin: While fetching https://dl.flathub.org/build-repo/106306/objects/fc/e978a2ccf30070652a18df44c2ee21b7db061ae9951388c1e26241f368c279.filez: Server returned HTTP 404
error: Failed to install io.gpt4all.gpt4all: While pulling app/io.gpt4all.gpt4all/x86_64/test from remote gpt4all-origin: While fetching https://dl.flathub.org/build-repo/106306/objects/fc/e978a2ccf30070652a18df44c2ee21b7db061ae9951388c1e26241f368c279.filez: Server returned HTTP 404

ThiloteE avatar Jun 05 '24 09:06 ThiloteE

Second the request for either a Flatpak, an AppImage or a Snap - in that order of preference. Running ANY app which is NOT directly supported by a given Linux distro is a recipe for a crash sooner or later. And not every distro runs off Debian or Ubuntu or Red Hat. openSUSE is a major distro supported (indirectly) by a commercial corporation. But it is a rolling release and if an app isn't directly supported by the openSUSE team, sooner or later it will crash.

richardstevenhack avatar Jun 16 '24 08:06 richardstevenhack

@richardstevenhack A flatpak is already available on Fedora and Linux Mint. You should check your distributions package manager.

Here is the flatpak repository by @Tim453. If you find any flatpak related bugs that only exist in the flatpak, but not in the normal version of GPT4All, you can raise issues there: https://github.com/flathub/io.gpt4all.gpt4all

Not sure, if Tim453 is officially related to Nomic.Ai, but thanks! It makes things a lot easier for a lot of users.

ThiloteE avatar Jun 16 '24 09:06 ThiloteE

Found the Flatpak and installed it. It appears to run, albeit with some error messages:

QML debugging is enabled. Only use this in a safe environment. Failed to open log file, logging to stdout... [Warning] (Sun Jun 16 03:49:13 2024): Qt: Session management error: Could not open network socket [Warning] (Sun Jun 16 03:49:13 2024): Qt: Session management error: Could not open network socket constructGlobalLlama: could not find Llama implementation for backend: cuda

I know why it didn't find a cuda backend; I'm not running an NVidia GPU, I'm running an older AMD CPU with only 2GB VRAM. I found the CPU setting so that should eliminate that message. I have a Ryzen 9 5950X with 64GB RAM, and don't have a problem running models of at least 7B size.

I'll test it out later by downloading one of the models.

Thanks for the reference to the Flatpak.

richardstevenhack avatar Jun 16 '24 11:06 richardstevenhack