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
Allow management of activate.d environment variables in environment.yml files #6649
Comments
#6681 is a proof-of-concept (that would need some cleanup before people consider landing it). @kalefranz is this a reasonable approach? |
I would love to see this implemented. Looks like it's failing some of the CI checks? Is there some way I can help with this? |
I was hoping to hear back from kalefranz before I spent any more time on it, to get a feel for whether they'd accept it if it passed all the tests and stuff, or if they'd prefer a different approach. If you want to dig into the CI stuff that might be mildly helpful, but I don't know if this proposal is a dead end or not. |
I would love to get this implemented - I once asked a question on Stack about the very problem this issue discusses and I keep getting reminders that this is a thing. I think the CI stuff may not have been due to the code itself, as it looks like a
I'm not 100% sure though. |
Any update on this? |
Any updates? At lest it would be cool to have LD_LIBRARY_PATH set automatically like: |
@woisu What would setting |
@mingwandroid any package you install that includes a .so would benefit from it. |
@pgunn, can you explain what you mean? I've seen mention to something being 'cool' and also to some 'benefit'. Can those be defined? |
@mingwandroid Sure. Let's say you're writing a mostly-python package that provides libfoobar.so and some dependent packages include binaries that would like to import libfoobar. LD_LIBRARY_PATH seems a reasonable way to do that. Common use-case: There may be other ways to do that (e.g. rpath), but this is a reasonably common mechanism that a lot of people are familiar with, and it's less complicated and more flexible. |
(I note that if there is no reasonable cross-platform equivalent of LD_LIBRARY_PATH that may be an argument against going down this route, or at least making the packager handle that complexity themselves) |
@pgunn, thanks. If you want to use Anaconda DSOs from non-Anaconda executables then In fact, we deliberately knock out the effect of We decided that we didn't want to partake in this, with the unfortunate loss of the occasionally useful developer feature of wanting to "test against these shiny new DSOs with my super bug fix in." I believe that To whit, all of our |
@mingwandroid Fair enough; I don't share your evaluation of LD_LIBRARY_PATH, but it's still a reasonable stance, particularly given the support burden you described. (my original feature request is much broader than this though, and for some packages I maintain I have parts of our install instructions that I'd love to ditch by having the environment file manage, such as telling Keras to always use Tensorflow and never Theano, or tweaking MKL or OpenBLAS settings) |
I'm not opposed to conda managing env vars in a more formalized way at all, I just wanted to make sure people mentioning Thanks! |
Hi there, thank you for your contribution to Conda! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue. In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again. Thanks! |
Have there been any updates regarding environment variables in environment files? |
@kostrykin it works: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#setting-environment-variables This issue should be closed |
Awesome! Not sure when this was implemented, but this looks great! |
This is a new feature proposal, to extend the format for the yml files usable to create conda environments, to allow expression of environment variables (with values) to be statically set. I propose:
Another toplevel in that file titled environment, with k=v elements under it being parsed as environment variables to set in the environment. Example:
my_tensorflow_environment.yml
channels:
dependencies:
environment:
When parsing this via "conda env create -f my_tensorflow_environment.yml -n tensor", conda would populate $INSTALL/envs/tensor/etc/conda/activate.d/env_vars.sh and deactivate.d/env_vars.sh accordingly.
The purposes of this proposal are:
If people like this proposal I'd be happy to work on it.
The text was updated successfully, but these errors were encountered: