I'm trying to use Azure batch services by creating linux vm. I have some computations for which I'm using python.To install some python packages, I have placed the install commands in script file and try to run that in startup.
pool.StartTask = new StartTask
{
// Specify a command line for the StartTask that copies the task application files to th
CommandLine = "bash -c \"bash /mnt/batch/tasks/startup/wd/installpackages.sh\"",
ResourceFiles = resourceFiles,
WaitForSuccess = true,
MaxTaskRetryCount = 5
};
This script execution fails due to permission problems. When i try to run script with "sudo", the following error occurs,
sudo: no tty present and no askpass program specified
The script is executed by the user "_azbatch" and on using sudo, it prompts for password which I don't know.
How to overcome this?