Azure / AzureContainers

R package for working with containers in Azure: ACI, ACR, AKS
Other
25 stars 10 forks source link

vig01_plumber_deploy.Rmd Line 93 issue? #18

Open Emily-Chai opened 2 years ago

Emily-Chai commented 2 years ago

'# build image 'bos_rf' call_docker("build -t bos_rf .")

I got the following error

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper sudo: a password is required Error in processx::run(dockercmd, realcmd, ..., echo = echo) : System command 'sudo' failed, exit status: 1, stdout & stderr were printed Type .Last.error.trace to see where the error occurred

hongooi73 commented 2 years ago

Where are you running R? Is this on Databricks, Azure Machine Learning or some other hosted platform?

Emily-Chai commented 2 years ago

I only ran it on RStudio on my laptop.

hongooi73 commented 2 years ago

You may be able to bypass the prompt by calling sudo manually in the terminal, before running the script. Eg a simple sudo ls should do.

Emily-Chai commented 2 years ago

I still have the same issue after doing what you recommended. I think I will look into how to "use the -S option to read from standard input or configure an askpass helper". Thank you.

saraemoore commented 10 months ago

I'm also running into this error when attempting to connect to an existing ACR from my laptop (running macOS). The issue seems to stem from the assumption in call_docker() that any OS not Windows will need to sudo docker ... instead of just docker .... I expect this to typically only be true on Linux, and even then, only some of the time. Would it be possible to make a change to this function so that either 1) an argument is passed in indicating whether sudo is necessary or 2) at least macOS is allowed to also pass through without sudo prepended?