Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Rajeev_A_Intel
Employee
127 Views

Create scripts which do not need sudo access

Today you need sudo access to run scripts  like demo_squeezenet_download_convert_run.sh and demo_security_barrier_camera.sh installed by OpenVINO in Linux environment. There are many situations where such access are not provided. It would be great if we can clean up the script to make no assumption about root or sudo access by the user. I could make it work without sudo access or root access by commenting out lot of code in the script demo_squeezenet_download_convert_run.sh. Some examples are

Comment out line 31 to 35 in demo_squeezenet_download_convert_run.sh

#if [[ $EUID -ne 0 ]]; then

#    echo "ERROR: to install CV SDK dependencies, you must run this script as root." >&2

#    echo "Please try again with "sudo -E $0", or as root." >&2

#    exit 1

#fi

 

Comment out line 64 to 66 in demo_squeezenet_download_convert_run.sh

#    sudo -E rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm || true

#    sudo -E yum install -y epel-release

#    sudo -E yum install -y ffmpeg gstreamer-plugins-base

 

Comment out line 98 in demo_squeezenet_download_convert_run.sh

#sudo -E $pip_binary install pyyaml requests

 

Comment out line 152 in demo_squeezenet_download_convert_run.sh and add your own source activate to a Python 3.6 conda environment

#source $prereqs_mo_path/../venv/bin/activate

source activate keras #This is your conda environment

0 Kudos
2 Replies
Cary_P_Intel1
Employee
127 Views

Hi, Rajeev,

good suggestion. Please try to file PR in Github so the reviewer can judge if it makes sense, since don't know if batch file owner intend to do this or not, filing PR in Github can get the feedback from engineer directly. 

berupon
Beginner
127 Views

Hi, Cary P.

 

Can you please tell me the address of the project at gihub.com?

I'd also like to create an issue about the scripts.

 

Reply