TorchStudio / torchstudio

IDE for PyTorch and its ecosystem
https://torchstudio.ai
MIT License
378 stars 27 forks source link

How is this packaged? #25

Closed netroy closed 2 years ago

netroy commented 2 years ago

Hi,

Is there any documentation on how the distributed versions of torchstudio are packaged? I see that the deb file contains a single binary and lots of Qt libraries. but, its unclear how these files get created. This makes the package look a bit suspicious.

Another advantage of documentation on packaging would be that we (the community) can help package this in more modern formats than deb (like Flatpak and Appimage), and get the app working on almost all modern Linux distros.

Thanks for your hard work, :slightly_smiling_face:

divideconcept commented 2 years ago

Hi, TorchStudio is composed of 2 components: a C++ GUI, and open source python scripts (cf the architecture drawing in the README.md). This repo contains the open source python scripts, and the official releases contains installers which deploy the compiled GUI binaries (in the appropriate application folder depending on your OS) and its the corresponding python scripts (in ~/TorchStudio/torchstudio). I hope to clarify a bit the status, contributions, etc later this week. Thanks for offering to help with Linux packaging, I'm indeed a bit new to this and went for the most known distribution.

Jdreioe commented 2 years ago

I'd love to see a Flatpak format as well, since .deb only works on Ubuntu. Fedora, Arch, OpenSuse cannot install TorchStudio via conversion via the "alien" package.

divideconcept commented 2 years ago

Is that Flatpak really standard ? I'm not that much familiar with the Linux world, but it looks like you need to install Flatpak first before being able to install a Flatpakaged software ?

Jdreioe commented 2 years ago

Is that Flatpak really standard ? I'm not that much familiar with the Linux world, but it looks like you need to install Flatpak first before being able to install a Flatpakaged software ?

Thanks for trying to learn and showing interest instead of just saying “No Flatpak support coming, only Ubuntu is supported.”! :)

There is 3 modern packaging solutions: Flatpak, Snap and AppImages. The main difference between Snap and Flatpak, is that Snap packages can only be distributed through the Canonical store, i.e. they are linked to it. This brings some advantages like improved security but limits the developer. Conversely, Flatpak is not connected to any shop and this makes each developer the owner of the shop’s distribution. This is more in line with the open-source philosophy. I don’t know much about AppImages, but, AFAIK, it’s comparable to an .exe-file in Windows which you download from the web and run.

The Linux community seem to be rallying behind Flatpak.

Flatpak is able to be installed on most (if not all) Linux distributions. It's something that takes one command to install for most distributions (except for Gentoo, where it's two commands) if not already installed by default. Also, Flatpaks can be used on ChromeOS, Steam Deck, etc. Therefore, by packaging TorchStudio as a Flatpak, the entire Linux desktop market can use it.

divideconcept commented 2 years ago

@netroy @Jdreioe do you have experience packaging applications using flatpak ? After a couple hours reading tutorials I'm still struggling to understand what I need to do to package an app such as TorchStudio... I made a post on reddit but so far no luck : https://www.reddit.com/r/flatpak/comments/vwmcu8/package_an_application_and_its_dependencies/

divideconcept commented 2 years ago

Turns out (based on the reddit comments) that flatpak is not well suited for the way TorchStudio is built. However starting with TorchStudio 0.9.8 a RPM installer is now also provided, which with the DEB installer should cover most Linux distributions !