Keep your Mac awake via the Amphetamine app
Keep your Mac awake
Prevent your computer from going to sleep