-
Notifications
You must be signed in to change notification settings - Fork 209
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
Make pixi create envs somewhere else than $PWD/.pixi
#997
Comments
That is an very interesting idea! We should discuss this. I love the idea for the faster disks. |
This may also help to resolve #777.
Would be so much helpful if this could be implemented. |
You get the ncurses issue (#234) when trying to run pixi in a VSCode devcontainer on macOS. When this is solved, we could also properly using devcontainers. My current workaround:
// https://github.com/prefix-dev/pixi/issues/997
"postCreateCommand": "mkdir -p /tmp/pixienv && ln -s /tmp/pixienv .pixi && pixi run postinstall && git config --global --add safe.directory ${containerWorkspaceFolder} && pixi run pre-commit-install", This is not optimal because then the macOS installation wouldn't work (unless EDIT: "mounts": ["source=${localWorkspaceFolderBasename}-pixi,target=${containerWorkspaceFolder}/.pixi,type=volume"],
"postCreateCommand": "sudo chown vscode .pixi && pixi run postinstall && git config --global --add safe.directory ${containerWorkspaceFolder} && pixi run pre-commit-install", |
I remember reading some concerns about activating symlinked environments. Something about some old compiled libraries resolving their own location in the wrong way or something like that. Pixi would have to resolve the symlink before activating/running/opening a shell, and that should be enough, I think? Edit, here they are: |
This would also help with two other issues I have:
|
this should not be necessary. You can chose I agree that this would be a great feature for the other reasons mentioned above, though. |
The plan we currently have:
|
Sounds great! |
|
@0xbe7a Yep, that is the idea. I would love to support some kind of full path things but that would make the path to long. |
Thanks for the tip! It works as a workaround, but it's a bit cumbersome when I have more than one pixi env in a project and want to switch between them. E.g. with Am I correct in thinking that microsoft/vscode-python#22978 will make it easier? |
yes, that should make it easier. i also thought that it might be interesting to implement some pixi detection in the jupyter plugin, i.e., that vscode can |
…e environments out of the project folder. (#1381) Fixes: #997 ### Todo: - [x] Fix tests - [x] Add warning on already local to project installed environments - [x] Add documentation - [x] Add symlink from target directory folder to local .pixi folder. - [x] Find solution to the `deny_unknown_fields` - [x] Also move `solve-envs` --------- Co-authored-by: Bas Zalmstra <zalmstra.bas@gmail.com>
when I set this global config entry at $HOME/.config/pixi/config.toml, I got error and it still fails, can we be more specific how to fix this error? please be patient with me |
Problem description
It would be nice if pixi could have the option of creating envs somewhere else than
$PWD
.This can be useful when your project is on a network drive and you don't want to have your conda envs there because it's too slow.
Possible solution
Pixi could have a global config option
custom_env_location = "/path/to/envs"
andpixi install
would create a symlink.pixi/envs/default -> /path/to/envs/<sha-of-$PWD/envs/default>
. (This is already possible if you create the symlink and the target directory beforehand; but quite tedious if you need to remember to do this all the time)This way it would still look like the env is in
$PWD
but it actually is on a different drive that's faster (and in some cases you can then even use hardlinks for your packages instead of copies).Also, since the directory is an arbitrary hash that people can't remember, people would not get wrong ideas to just use this directory as a named conda environment; they would still use the one in
$PWD/.pixi/envs/default
.The env prefix still being at
.pixi/envs/default
should not be a problem in this scenario, right?The text was updated successfully, but these errors were encountered: