3

I have an SBC (pine64) running Ubuntu 16_04 and I have a long process to do (build tensorflow). I'm using the nohup command to detach the process from my SSH session but two days consecutively my board rebooted at midnight. I saw that I can inhibit reboot, sleep and shutdown with systemd-inhibit.

Is there a way to use this command without sudo? Bazel build doesn't recognize my %JAVA_HOME when launched with sudo...

This is the command I'm trying to run:

systemd-inhibit --why="Compiling TF" nohup bazel build -c opt --copt="-funsafe-math-optimiza
tions" --copt="-ftree-vectorize" --copt="-fomit-frame-pointer" --verbose_failures tensorflow/tools/pip_package:build_pip_pa
ckage &  

which gives me:

Failed to inhibit: Access denied

Any advice?

1 Answers1

1

You can use systemd-inhibit --what=idle as a normal user to prevent the machine from suspending due to system idleness. Other locks require elevated privileges.

Daniel
  • 797
  • 1
  • 6
  • 25