-
-
Notifications
You must be signed in to change notification settings - Fork 341
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
[BUG] /lsiopy folder & 'VIRTUAL_ENV': '/lsiopy': Why included in image? #189
Comments
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid. |
Jenkinsfile line is unrelated All of our images that utilize python activate that venv. You can either override that env var, or choose to use that path for the venv. For the latter, you would have to activate the venv at that path (the mod may have to do that as well). |
Thank you for the follow up. Just so that I get it right: when I run codeserver, python is not installed (and therefore python virtual env cant be active) but the VIRTUAL_ENV-variable is set. If my understanding is correct, my next question: does that make sense? Isn‘t the VIRTUAL_ENV there to flag that the venv is active (and at what path)? Of course, I can unset the variable myself, but (and I‘m not an expert here) if VIRTUAL_ENV should indicate whether the venv is active (ENV set = venv active) but in the image it‘s set and the venv is not active, should this ENV not be removed from the image (since suggesting a misleading status)? |
Any container that installs/uses python has the venv activated. On other containers it doesn't matter if that env var is set or not because there is no python to begin with. Even our package install mod is set to activate the venv if python and/or pip packages are installed. The issue you're having is that the poetry mod does not activate the venv. It's a third party submitted mod. You can open an issue or a PR in its repo. |
I am not taking about a mod. I run the codeserver image and on the terminal install python as well as poetry. I did raise it with them; their response, however, is that the env VIRTUAL_ENV is the signal to tell that the venv is active.
My take from your response is that your usage is different. You use VIRTUAL_ENV to say „here is where the virtual env ought to go“ but the presence of VIRTUAL_ENV says nothing about whether said venv is active or not. I am not an expert but I‘d say we have here two different notions what VIRTUAL_ENV represents (codeserver: just a dir, poetry: dir and active status). Is there an agreed definition what that ENV expresses? If with status, then I think codeserver should not include the VIRTUAL_ENV if venv not active. |
We have mods for that reason. They install the necessary packages and prepare the environment as necessary. We don't recommend or support manually installing packages inside the container as they also get wiped during container recreation. |
Thank you for clarifying |
Is there an existing issue for this?
Current Behavior
The vscode image comes with a folder called "/lsiopy" and a enviornment variable 'VIRTUAL_ENV': '/lsiopy'..
My take is that these are two remnants of the Jenkins file. Since the vscode image does not actually have a python binary installed, I am not sure these two serve any purpose and I wonder why they are included in the image.
docker-code-server/Jenkinsfile
Line 269 in 2f251a6
The reason I am bringing this up is because the VIRTUAL_ENV variable has caused an issue for me, since the application "poetry" is also using the same variable, and I hadn't been aware that codeserver already had set a value for it.
Expected Behavior
If there is no use of the /lsiopy folder and the associated environment variable post jenkins installation they should not be included in the image.
Steps To Reproduce
test -d /lsiopy && echo "Directory exists" || echo "Directory does not exist"
echo $VIRTUAL_ENV
CPU architecture
x86-64
Docker creation
The text was updated successfully, but these errors were encountered: