Hi Matthew, I am not familiar with nix and how exactly it would fit. If you look at the osv-apps repo there are many examples of python 2/3 apps. All of those are driven by module.py and optional makefiles to do a job of collecting relevant files to the final OSv image as scripts/build, scripts/module.py orchestrates it all. Alternatively, there is capstan with its package* command and *.mpm archives. I am not sure where and how nix would fit into this.
Now the purpose of manifest_from_host.sh is quite simple - given a Linux shared library/-ies or executable or a directory with those, find all *dependant* shared libraries based on information in DT_NEEDED elf header. As you can see it is not specific to Python. On other hand manifest_from_host.sh is not indended and can not find all other dependencies (*.py., *.pyc, etc files) full Python runtime needs. My sense is that would still need to run manifest_from_host.sh against files built by nix but I might be wrong. Another alternative to building OSv images could be using Docker images and unpacking them to create corresponding OSv image. For an example look at https://github.com/cloudius-systems/osv-apps/tree/master/openjdk12-jre-from-docker which uses undocker tool. Another alternative would be then to use Python docker image in a similar way. And possibly combine it with capstan. I hope it helps a bit, Waldek On Tuesday, November 3, 2020 at 10:03:20 AM UTC-5 Matthew Kenigsberg wrote: > > Hi, > > Is there a recommended way to add pip packages to osv images? > > Was trying to figure that out and I also have a suggestion: I started > using nix, which is a package manager, and it seems like it could be a > really good tool for the job. It keeps track of every dependency for a > piece of software, and copying all the files to run an image with python38 > and some pip packages only takes one command. I think using nix could > also make manifest_from_host.sh unnecessary (?) > > Anyways, is there an easier way to be using pip packages? > > Thanks, > Matthew > -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/0b8be52b-1b43-4069-9c69-3a320b8046e4n%40googlegroups.com.
