Skip to content

Provide a more isolated installation mechanism #13

Open
@velovix

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions