Portable Xcopy-able Venvs
See original GitHub issueHow would this feature be useful?
- Ability to attach docker volumes (dir paths) directly to a running or “stock” docker image.
- Ability to archive, ship, and reuse/restore virtual environment directories across environments.
- Ability to dynamically compose complex environments from static/precompiled pipx package archives.
Describe the solution you’d like
If don’t know if there would be technical blockers for this, but the idea would be:
On Machine A
:
pipx install my-tool
pipx export my-tool ./my-tool.tar.gz
On Machine B
:
pipx import ./my-tool.tar.gz
And similarly, when attached to a docker container:
myhost$ unzip ./my-tool.tar.gz ./my-tool
myhost$ docker run --it -v ./my-tool:/pipx/portable/my-tool pipx:py3.8
docker$ pipx load-from /pipx/portable
docker$ my-tool --version
Describe alternatives you’ve considered
From within a Dockerfile, you can copy directories across composite images, but I have not fully tested this and I don’t have a universal/portable way to ensure shims are properly installed/updated when copying from one image/machine to another.
Challenges anticipated:
- Shims won’t get copied over with the virtual env directory - they’d probably need to be re-initialized/refreshed by an explicit pipx command.
- There may be limitations in portability based on (1) the version of python and (2) the platform and version of the host OS.
I think even if we mandate same python version and same core OS platform, this could have very high value in making compatible docker images composable.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
pipx - Bountysource
I'm currently trying to install pipx within my windows machine, and it seems that is not able to detect my path environmental variables...
Read more >Level Showcase - LBPCentral Archive
Venus Valley! (1 Player Only!) ... Sackbot X - COPYABLE LEVEL TOOLS! ... RX-78 Mobile Suit Gundam by dr-booty, 1, dr-booty, 2011-06-17 23:19:00....
Read more >pipx - bytemeta
Portable Xcopy-able Venvs. itsayellow. itsayellow CLOSED · Updated 1 year ago · Other `pipx list` output formats. mmozos. mmozos CLOSED · Updated 1...
Read more >Untitled
Select Katalon Studio Preferences > Katalon > Mobile. ... look at the other solutions: is:issue "DLL required for this install" Also node is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t have much experience to pex, but zipapp is a very established mechanism that is known to work (pip internally uses it as well). Shiv is a similar tool built on zipapp.
There are some gochas to zipapp if a module is poorly implemented. Those issues are fortunately increasingly rare, and you can always patch them when necessary (since the zipapp veondors all the libraries by definition anyway). I would highly encourage you trying it out.
Thanks, @uranusjr! I’ll check it out! 😄