Created
October 9, 2021 03:24
-
-
Save yani-/a1bae16f93c8d7b067c93eb5482a7608 to your computer and use it in GitHub Desktop.
vast.ai
This file contains 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 | |
apt-get install -y vim netcat curl libglu1-mesa-dev libxi6 libxrender1 libfontconfig1 libxxf86vm-dev libxfixes-dev libgl1-mesa-glx | |
curl -OL https://ftp.halifax.rwth-aachen.de/blender/release/Blender2.93/blender-2.93.4-linux-x64.tar.xz && unxz blender-2.93.4-linux-x64.tar.xz && tar -xvf blender-2.93.4-linux-x64.tar | |
cd blender-2.93.4-linux-x64 && mkdir media output | |
cat << EOF > gpu.py | |
import bpy | |
scene = bpy.context.scene | |
scene.cycles.device = 'GPU' | |
prefs = bpy.context.preferences | |
prefs.addons['cycles'].preferences.get_devices() | |
cprefs = prefs.addons['cycles'].preferences | |
cprefs.compute_device_type = 'CUDA' | |
for device in cprefs.devices: | |
if device.type == 'CUDA': | |
device.use = True | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment