-
Notifications
You must be signed in to change notification settings - Fork 50
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] - Conda-Store strips environment vars from env.yaml spec. #719
Comments
I think this is an issue with conda-lock. When parsing the environment.yaml they simply don't consider the Short term, The Long term, the handling of the variables section should be fixed upstream in conda-lock. |
I'll take a look and say for sure. It could be that our specification parser just strips it before conda-lock is called. UPD: Looks like Andrew is right. Variable parsing landed in #424, but then it broke once we switched to conda-lock. For reference, in conda-lock, the parsing is done via I think it should be possible to pass It seems like setting UPD2: Unlike the server, conda-store-ui doesn't have support for variables, even when you use the raw YAML field, so using the above will only work via the server admin environment edit page. |
Status update: opened a PR with the quick fix on the server side. Will need to open another PR on the UI side to make this work via the UI (inlcuding via raw YAML) because the UI strips variables. With the current PR, it will only work via the server admin environment page. |
Follow up: #721 will provide a path for the I am asking because 1) the use of the cc @dharhas |
I vote on making the appropriate fixes upstream in conda-lock. In the short term, does #721 at least allow us to build GPU enabled environments? |
I've only tested this by generating a lockfile on a CPU-only machine, then manually transferring that lockfile and building from it on a machine with a GPU. Described in more detail here: #721 (comment) I think we should test on Nebari: run a CPU-only instance, build, then switch to a GPU-enabled instance and see if it works. But I don't have access to a Nebari deployment where I could try that at the moment. I'll follow up offline. |
Status update: merged the quick fix, but it'll only work via the admin UI. To make this work via the new UI, this needs to be reviewed and merged as well: conda-incubator/conda-store-ui#354 |
Describe the bug
The conda env.yaml spec allows setting environment variables :
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#setting-environment-variables
We need this to enable GPU builds when using conda-store. It looks like conda-store is stripping the env variable section from the yaml.
Expected behavior
The environment variables are maintained in the yaml and used in building the environment.
How to Reproduce the problem?
Use the following env:
build the environment and then open the yaml again and the variables section is missing.
if you look at the generated lock file you can also see that the env variables were not used:
Output
No response
Versions and dependencies used.
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: