Skip to content
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

Using conda update in case conda create fails #948

Merged
merged 3 commits into from
Nov 29, 2024
Merged

Conversation

oierlauzi
Copy link
Collaborator

Using conda update when conda create fails. In this manner, we are able to handle issue #925 without parsing the conda version.

@oierlauzi oierlauzi self-assigned this Nov 29, 2024
@oierlauzi oierlauzi added the bug Something isn't working label Nov 29, 2024
@oierlauzi oierlauzi marked this pull request as ready for review November 29, 2024 11:42
Copy link
Collaborator

@albertmena albertmena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elegant solution

@@ -320,7 +320,7 @@ def installEnvironCmd(name: str, requirementsFn: str, gpu=False):

target = name + '.yml'
commands = []
commands.append('conda env create --yes -f %s' % requirementsFn)
commands.append('conda env create -f %s || conda env update -f %s' % (requirementsFn, requirementsFn))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--yes was removed, add

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required with this change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--yes is not compatible across versions, thats the purpose of this PR

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I understood you provide two options the first (newers, the second the olders)

Copy link

sonarcloud bot commented Nov 29, 2024

@albertmena albertmena merged commit e0fe84e into devel Nov 29, 2024
6 checks passed
@albertmena albertmena deleted the olz_conda_create branch November 29, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants