Downloading R libraries from CRAN to the laptop

Gopinath Rajee 656 Reputation points
2022-11-20T02:09:47.54+00:00

All,

Our Azure Databricks workspace does not have outbound access to the internet due to which we have to manually download libraries that are needed and upload them to the workspace.

I need to make nloptr library available in the cluster. Any idea how I can download this library to my laptop. I can only see Windows and MacOS binaries.

Thanks,
grajee

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,555 questions
{count} votes

Accepted answer
  1. MartinJaffer-MSFT 26,156 Reputation points
    2022-11-22T04:35:28.467+00:00

    Hello @Gopinath Rajee ,
    Thanks for the question and using MS Q&A platform.

    As I understand, you disabled outbound traffic from your Databricks workspace, and now that makes installing libraries difficulty.
    The ask, is what to download for nloptr.

    To see what R would use, I spun up a cluster and tried to install.
    install.packages("nloptr")
    download
    I found it downloads the source code rather than the binaries. Then it compiles and runs.
    compile

    I noticed when trying to upload libraries, there was only jar and python options. So I'm not sure just uploading like that will work.
    However, I think uploading as file into dbfs (as opposed to "new library") and then trying the install using the file rather than the remote package will work.

    Please do let me if you have any queries.

    Thanks
    Martin


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
      • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Gopinath Rajee 656 Reputation points
    2022-11-29T21:16:55.407+00:00

    I was able to upload the tar.gz file into the cluster and add it as the library.

    Gopi

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.