Last active
August 22, 2022 09:50
-
-
Save UuuNyaa/f57aa37fc6ed2fbd5c166513a16a40e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| set -ex | |
| # Requirements | |
| # Ubuntu 20 LTS | |
| # Setup versions | |
| # NVIDIA Driver 450 | |
| # Blender 2.83 LTS | |
| # update OS packages | |
| sudo apt update | |
| sudo apt -y upgrade | |
| # install NVIDIA driver | |
| sudo add-apt-repository -y ppa:graphics-drivers/ppa | |
| sudo apt update | |
| sudo apt install -y --no-install-recommends nvidia-driver-450 ubuntu-drivers-common | |
| # setup headless Xorg for Eevee | |
| echo \ | |
| '00 ff ff ff ff ff ff 00 1e 6d f5 56 71 ca 04 00' \ | |
| '05 14 01 03 80 35 1e 78 0a ae c5 a2 57 4a 9c 25' \ | |
| '12 50 54 21 08 00 b3 00 81 80 81 40 01 01 01 01' \ | |
| '01 01 01 01 01 01 1a 36 80 a0 70 38 1f 40 30 20' \ | |
| '35 00 13 2b 21 00 00 1a 02 3a 80 18 71 38 2d 40' \ | |
| '58 2c 45 00 13 2b 21 00 00 1e 00 00 00 fd 00 38' \ | |
| '3d 1e 53 0f 00 0a 20 20 20 20 20 20 00 00 00 fc' \ | |
| '00 57 32 34 35 33 0a 20 20 20 20 20 20 20 01 3d' \ | |
| '02 03 21 f1 4e 90 04 03 01 14 12 05 1f 10 13 00' \ | |
| '00 00 00 23 09 07 07 83 01 00 00 65 03 0c 00 10' \ | |
| '00 02 3a 80 18 71 38 2d 40 58 2c 45 00 13 2b 21' \ | |
| '00 00 1e 01 1d 80 18 71 1c 16 20 58 2c 25 00 13' \ | |
| '2b 21 00 00 9e 01 1d 00 72 51 d0 1e 20 6e 28 55' \ | |
| '00 13 2b 21 00 00 1e 8c 0a d0 8a 20 e0 2d 10 10' \ | |
| '3e 96 00 13 2b 21 00 00 18 00 00 00 00 00 00 00' \ | |
| '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 26' \ | |
| | sudo tee /etc/X11/edid_DFP-0.txt | |
| sudo nvidia-xconfig -a --virtual=1920x1080 \ | |
| --allow-empty-initial-configuration \ | |
| --use-display-device=DFP-0 \ | |
| --connected-monitor=DFP-0 \ | |
| --custom-edid=DFP-0:/etc/X11/edid_DFP-0.txt | |
| # install Blender | |
| sudo apt install -y --no-install-recommends blender | |
| sudo snap install blender --channel=2.83lts/stable --classic | |
| sudo apt remove -y blender | |
| sudo apt -y clean | |
| hash -r | |
| # restart | |
| sudo shutdown -r 0 | |
| # Headless rendering in Eevee is now possible! | |
| # Use Blender CLI with DISPLAY=:0, as in the following lines | |
| # sudo Xorg :0 & | |
| # DISPLAY=:0 /snap/bin/blender -b BLEND_FILE -s START_FRAME -e END_FRAME -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment