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

[Cluster launcher] botocore is a dependency that isn't automatically installed by Ray #39941

Closed
architkulkarni opened this issue Sep 28, 2023 · 4 comments · Fixed by #39942
Closed
Labels
bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks

Comments

@architkulkarni
Copy link
Contributor

architkulkarni commented Sep 28, 2023

What happened + What you expected to happen

Installing the Ray nightly wheel should include all dependencies. However this isn't the case

pip install "ray[default]@https://s3-us-west-2.amazonaws.com/ray-wheels/latest/ray-3.0.0.dev0-cp39-cp39-macosx_11_0_arm64.whl"
ray up

This leads to a modulenotfounderror for botocore. The workaround is to pip install boto3 but ideally it should be automatically installed. (A separate issue -- once this is fixed, we should also print a friendly error message if the user forgot to install ray[default] and instead just installed ray.)

Versions / Dependencies

Mac M1 python 3.9

Reproduction script

above

Issue Severity

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

@architkulkarni architkulkarni added bug Something that is supposed to be working; but isn't P1 Issue that should be fixed within a few weeks labels Sep 28, 2023
@architkulkarni
Copy link
Contributor Author

architkulkarni commented Sep 28, 2023

@hongchaodeng could you please post the exact traceback here for the botocore not found error?

@hongchaodeng
Copy link
Member

Here's the traceback:

ray up python/ray/autoscaler/aws/example-minimal.yaml
hello
Cluster: aws-example-minimal

2023-09-28 10:16:30,801	INFO util.py:375 -- setting max workers for head node type to 0
2023-09-28 10:16:30,801	INFO util.py:379 -- setting max workers for ray.worker.default to 2
Traceback (most recent call last):
  File "/Users/hongchao.deng/miniforge3/envs/ray/bin/ray", line 8, in <module>
    sys.exit(main())
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/ray/scripts/scripts.py", line 2499, in main
    return cli()
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/ray/autoscaler/_private/cli_logger.py", line 856, in wrapper
    return f(*args, **kwargs)
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/ray/scripts/scripts.py", line 1299, in up
    create_or_update_cluster(
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/ray/autoscaler/_private/commands.py", line 311, in create_or_update_cluster
    config = _bootstrap_config(config, no_config_cache=no_config_cache)
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/ray/autoscaler/_private/commands.py", line 383, in _bootstrap_config
    provider_cls = importer(config["provider"])
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/ray/autoscaler/_private/providers.py", line 29, in _import_aws
    from ray.autoscaler._private.aws.node_provider import AWSNodeProvider
  File "/Users/hongchao.deng/miniforge3/envs/ray/lib/python3.9/site-packages/ray/autoscaler/_private/aws/node_provider.py", line 9, in <module>
    import botocore
ModuleNotFoundError: No module named 'botocore'

architkulkarni added a commit that referenced this issue Nov 27, 2023
…piclient imports (#39942)

Adds a friendlier warning when required packages for the cluster launcher are missing. boto3 in the case of AWS, and googleapiclient for GCP

Related issue number
Closes #39941

---------

Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
ujjawal-khare pushed a commit to ujjawal-khare-27/ray that referenced this issue Nov 29, 2023
…piclient imports (ray-project#39942)

Adds a friendlier warning when required packages for the cluster launcher are missing. boto3 in the case of AWS, and googleapiclient for GCP

Related issue number
Closes ray-project#39941

---------

Signed-off-by: Archit Kulkarni <[email protected]>
Signed-off-by: Archit Kulkarni <[email protected]>
@BwL1289
Copy link

BwL1289 commented Jan 5, 2024

@architkulkarni @hongchaodeng not sure this is the place to ask.

We already have boto3 and botocore installed and don't want them to be installed again while launching the cluster. Is there a way to skip installation on cluster launch?

Also, somewhat related, we get a .bashrc no file or directory on launch. Not sure what the cluster is attempting to do with it, but do you know of a way to rectify this as well?

@BwL1289
Copy link

BwL1289 commented Jan 5, 2024

Nevermind, I figured it out both of the above. My apologies.

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 P1 Issue that should be fixed within a few weeks
Projects
None yet
3 participants