That's... surprising. And do you know how venv behaves? I thought that one of the reasons why virtualenv is so much faster than venv is because it doesn't perform any networking in the background.
@Bryft2 жыл бұрын
You suggested to use these flags in docker. But how to get a stable version of virtualenv in a docker image? I remember the video about bootstrapping it from downloaded pyz, but maybe in docker it's better to 'pip install' it with the '==', so we always have the same version?
@anthonywritescode2 жыл бұрын
you can select a consistent pyz file from github.com/pypa/get-virtualenv/tree/main/public
@Bryft2 жыл бұрын
@@anthonywritescode got it, thanks!
@r4vik2 жыл бұрын
Should we even bother with virtualenv in docker?
@anthonywritescode2 жыл бұрын
yes absolutely -- messing with the system python is a recipe for disaster
@r4vik2 жыл бұрын
@@anthonywritescode obviously not with python:3-buster image or python:3-slim but alpine should be ok.. there isn't anything installed in the "system python" e.g. podman run --rm -it python:3-alpine sh -c "ls /usr/local/lib/python3.11/site-packages" README.txt distutils-precedence.pth pip-22.3.dist-info setuptools wheel _distutils_hack pip pkg_resources setuptools-65.5.0.dist-info wheel-0.38.4.dist-info
@anthonywritescode2 жыл бұрын
every modern linux os, yes even alpine, uses python packages as part of its system
@alsonyang230 Жыл бұрын
@@anthonywritescode Can you make a video on what kind of issues we could run into if we dont use virtual env in docker? I would have thought Docker already provides the benefit of virtual env, which is an isolated env