How come terminal processes are paused when display sleeps?
In High Sierra there is a 2 setting in System Preferences > Energy for that. Enable Prevent computer from sleeping....or/and set Display sleep to Never.