aotuai / brainframe-cli

🧠🖼️👩🏽‍💻 A CLI that makes installing and managing a BrainFrame server easy!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide a more isolated installation mechanism

velovix opened this issue · comments

Using Pip for installation is a reasonable solution, but there may be better options. Using Pip requires that Python dependencies are installed globally, which may conflict with other tools. Arch Linux in particular saves globally installed Pip libraries to /usr/lib, which means they can conflict with Python packages installed with Pacman.

Here are some other options, with a non-exhaustive list of pros and cons:

pipx

Pros:

  • A very lightweight solution
  • Allows us to still distribute with PyPI
  • Easy updates

Cons:

  • It's another tool we have to ask users to install
  • Ubuntu doesn't have PATH set up properly by default to allow pipx to work out of the box
  • The user has to set up their PATH in such a way that the command is accessible both with and without sudo

AppImage

Pros:

  • Offers a one-liner installation experience (sudo curl https://aotu.ai/brainframe.AppImage > /usr/local/bin/brainframe && sudo chmod +x /usr/local/bin/brainframe)

Cons:

  • No automated update experience. Users would have to keep downloading new releases.
  • Apparently non-trivial to use with Python

PyInstaller

See #27

Pros:

  • One-liner installation experience, like AppImage
  • Easy to use

Cons:

  • No automated update experience, like AppImage
  • Lagging support for Python releases

Snap or Flatpak

Pros:

  • Offers a one-liner installation experience for some distributions
  • Automatic updates
  • Easy to use

Cons:

  • May defeat the security goals of these tools. The CLI needs pretty significant access to the system.
  • Some distributions don't have either available by default. Users may be reluctant to install an entire daemon just to install one tool.
  • Snaps can only really interact with Docker if Docker itself is installed with Snap.

Distribution Packages

See #25

Pros:

  • A very lightweight solution from a user perspective
  • Some users may find this more palatable than other options
  • Easy updates
  • dh-virtualenv allows us to package Python dependencies independently from the package manager

Cons:

  • Supporting multiple distributions is an O(n) problem, with each distribution having its own packaging system and versions of our dependencies
  • Installation effort depends on the distribution, but will rarely be a strictly one-line affair unless we manage to get the package into the official repositories