-- install lotus run env depencies -- @Author: Rock -- modify timezone print("Try to modify the timezone...") if (os.execute("timedatectl set-timezone Asia/Shanghai") == nil) then print(" -- [Failed]. \n") else print(" -- [OK]. \n") end print("Try to sync the hareware time...") if (os.execute("hwclock --hctosys") == nil) then print(" -- [Failed]. \n") else print(" -- [OK]. \n") end -- install depencies os.execute("apt-get update") print("Try to install the depencies software...") if (os.execute("apt-get install mesa-opencl-icd ocl-icd-opencl-dev ntpdate -y") == nil) then print(" -- [Failed]. \n") else print(" -- [OK]. \n") end -- install libhwloc print("Intalling libhwloc-dev ...") if (os.execute("apt-get install libhwloc-dev -y") == nil) then print(" -- [Failed]. \n") else os.execute("ln -s /usr/lib/x86_64-linux-gnu/libhwloc.so.5.7.6 /usr/lib/x86_64-linux-gnu/libhwloc.so.15") -- for ubuntu 20.04-LTS os.execute("ln -s /usr/lib/x86_64-linux-gnu/libhwloc.so.15 /usr/lib/x86_64-linux-gnu/libhwloc.so.5") print(" -- [OK]. \n") end -- sync timestamp print("Try to sync timestamp...") if (os.execute("ntpdate -u cn.ntp.org.cn") == nil) then print(" -- [Failed]. \n") else print(" -- [OK]. \n") end