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

specifying conda runtime_env using fullpath no longer works #44373

Closed
deepio-oc opened this issue Mar 29, 2024 · 5 comments · Fixed by #45550
Closed

specifying conda runtime_env using fullpath no longer works #44373

deepio-oc opened this issue Mar 29, 2024 · 5 comments · Fixed by #45550
Assignees
Labels
bug Something that is supposed to be working; but isn't core Issues that should be addressed in Ray Core core-runtime-env Issues related to Ray environment dependencies enhancement Request for new feature and/or capability @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. P1 Issue that should be fixed within a few weeks

Comments

@deepio-oc
Copy link

deepio-oc commented Mar 29, 2024

What happened + What you expected to happen

In earlier version of ray (2.6.3), I was able to specify full path to conda environment to select a specific conda environment. In latest version (2.9.3), I get an error

File "/usr/conda/lib/python3.10/site-packages/ray/_private/runtime_env/conda.py", line 348, in _create raise ValueError( ValueError: The given conda environment '/usr/conda' from the runtime env {'_ray_commit': '62655e11ed76509b78654b60be67bc59f8f3460a', 'conda': '/usr/conda'} doesn't exist from the output ofconda env list --json. You can only specify an env that already exists. Please make sure to create an env /usr/conda

"/usr/conda" is present in conda env list --json. This is broken by this PR

69ed38b

envs = [Path(env).name for env in conda_env_list] line is only checking the last path component and not the full path.

I tried specifying just the last path component but that also does not work. Conda environments created using -p prefix are no longer working.

Versions / Dependencies

Ray: 2.9.3
Python: 3.10.13

Reproduction script

import ray
ray.init(runtime_env={"conda": "/usr/conda"})

Issue Severity

Medium: It is a significant difficulty but I can work around it.

@deepio-oc deepio-oc added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Mar 29, 2024
@jrandall
Copy link

jrandall commented Apr 3, 2024

This issue affects me as well (ray 2.10.0).

@anyscalesam anyscalesam added the core Issues that should be addressed in Ray Core label May 13, 2024
@jjyao jjyao added P0 Issues that should be fixed in short order core-runtime-env Issues related to Ray environment dependencies and removed triage Needs triage (eg: priority, bug/not-bug, and owning component) labels May 13, 2024
@anyscalesam anyscalesam assigned rynewang and unassigned rynewang May 16, 2024
@jjyao
Copy link
Collaborator

jjyao commented May 28, 2024

@deepio-oc @jrandall just curious why you want to specify the full path instead of just the name?

@anyscalesam anyscalesam added P1 Issue that should be fixed within a few weeks enhancement Request for new feature and/or capability and removed P0 Issues that should be fixed in short order labels May 31, 2024
@anyscalesam anyscalesam added the @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. label Jun 24, 2024
@jjyao
Copy link
Collaborator

jjyao commented Jul 9, 2024

@deepio-oc @jrandall could you tell us a bit more why you want to use the fullpath?

@deepio-oc
Copy link
Author

deepio-oc commented Jul 15, 2024

@jjyao conda allows creating environments using path (-p) or name (-n) option. In our case, we have some environments using name (in our home directories) (which is on network filesystem) and some environments in /usr/conda (which is on SSD). So we need control on the path where conda envs are created. If I specify path while creating environment, conda doesn't allow specifying name. So in ray.init I can only pass path.

@jjyao
Copy link
Collaborator

jjyao commented Jul 15, 2024

Got it. Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to be working; but isn't core Issues that should be addressed in Ray Core core-runtime-env Issues related to Ray environment dependencies enhancement Request for new feature and/or capability @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants