AzureContainers icon indicating copy to clipboard operation
AzureContainers copied to clipboard

vig01_plumber_deploy.Rmd Line 93 issue?

Open Emily-Chai opened this issue 4 years ago • 5 comments

'# 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

Emily-Chai avatar Jan 24 '22 23:01 Emily-Chai

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

hongooi73 avatar Jan 25 '22 06:01 hongooi73

I only ran it on RStudio on my laptop.

Emily-Chai avatar Jan 25 '22 13:01 Emily-Chai

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.

hongooi73 avatar Jan 25 '22 14:01 hongooi73

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.

Emily-Chai avatar Jan 25 '22 16:01 Emily-Chai

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?

saraemoore avatar Nov 14 '23 02:11 saraemoore