Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offline installation with local archive file #94

Open
Jakob-Stadler opened this issue Mar 4, 2024 · 0 comments
Open

Offline installation with local archive file #94

Jakob-Stadler opened this issue Mar 4, 2024 · 0 comments

Comments

@Jakob-Stadler
Copy link

Hi there,

I came across in this project in the search of a way to distribute Python report builder scripts to my non-programmer colleagues.
So far I've been using pyinstaller to build one-file executables that are placed on a (slow, non-local) network share. Adding a few "heavier" dependencies (like pandas, etc.) causes the file size to balloon in size and slow down startup times to a crawl. Other solutions like having users install the executable locally cause issues by users staying on outdated versions. I want there to be one source of truth and only one way to start it.

I really like the approach of one executable installing and "caching" itself locally on the user's machine and then just delegate the call to the cache for faster startup times after the first run.

However, I have a hit a few road blocks while testing pyapp for this purpose:

  • Corporate firewalls inserting their MITM certificate in the TLS chain causing install failures
  • Adding to that, I'd prefer to keep dependencies as static as possible, with ideally no network fetch needed at all
  • Embedding the distribution including all the dependencies is not very well explained in the documentation. Ideally I would want to have a recipe on how to prepare the distribution with all necessary packages including which environment variables to set
  • Even without dependencies, embedding Python itself causes the same file size bloat and slow startup issues that I'm trying to get away from.

So I would love to have a way to embed all the data, but without actually embedding it. Instead, the executable itself should be as tiny as possible to speed up startup times and delegate the call to the local installation. Only if the local installation is not available (or the management interface is called), it should read and map a blob file placed nearby that contains the all the code and data required for the full operation of pyapp.

It would look something like this:

///network/share/directory/
  - create_XYZ_report.exe  <-- tiny executable with the bare essentials to locate the local cache
  - create_XYZ_report.blob <-- all the code and data required to deploy for the first run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant