Last active
January 25, 2024 13:11
-
-
Save Raimund58/685ec8da663c2bbcc954c4af711f97dd to your computer and use it in GitHub Desktop.
SheepIt_GPU.ipynb
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
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "SheepIt_GPU.ipynb", | |
"private_outputs": true, | |
"provenance": [], | |
"authorship_tag": "ABX9TyPB04GW3rgHpfJR6XBYYRIc", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"gpuClass": "standard", | |
"accelerator": "GPU" | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/Raimund58/685ec8da663c2bbcc954c4af711f97dd/sheepit_gpu.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"metadata": { | |
"id": "joRZi_pDU4Se" | |
}, | |
"source": [ | |
"### A working GPU Colab notebook. ###\n", | |
"\n", | |
"#Info about the runtime\n", | |
"!cat /etc/os-release\n", | |
"!nvidia-smi\n", | |
"!nvcc --version\n", | |
"\n", | |
"#This first Block is required as some weird behaviors with libtcmalloc appeared in the colab VM.\n", | |
"import os\n", | |
"os.environ[\"LD_PRELOAD\"] = \"\"\n", | |
"!apt update\n", | |
"!apt remove libtcmalloc-minimal4\n", | |
"!apt install libtcmalloc-minimal4\n", | |
"os.environ[\"LD_PRELOAD\"] = \"/usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4\" #no idea if libtcmalloc_minimal.so.4 or libtcmalloc_minimal.so.4.5.3 works better\n", | |
"!echo $LD_PRELOAD\n", | |
"\n", | |
"#This is for Blender and the GPU to work as expected.\n", | |
"!apt update\n", | |
"!apt install libboost-all-dev\n", | |
"!apt install libgl1-mesa-dev\n", | |
"!apt install libglu1-mesa\n", | |
"!apt install libsm-dev\n", | |
"!apt install libxkbcommon0\n", | |
"!apt install libsm6\n", | |
"!apt install libxrender1\n", | |
"!apt install libxi6\n", | |
"!apt autoremove\n", | |
"\n", | |
"#Download and run sheepit.\n", | |
"!wget https://www.sheepit-renderfarm.com/media/applet/client-latest.php -O client.jar\n", | |
"!java -jar client.jar \\\n", | |
"\\\n", | |
"-login \"Quelex_Productions\" \\\n", | |
"-password \"EIlfLjztnPvuJuAZha1kbEyUlApH8SqDtDqOfg5t\" \\\n", | |
"\\\n", | |
"-cache-dir /content/cache -ui text -compute-method GPU -gpu OPTIX_0 -rendertime 120 #--verbose #ONLY TO DEBUG\n", | |
"#run the next command if you don't want ANY cell output (That also means that no debugging is possible)\n", | |
"#!nohup java -jar client.jar -login Quelex_Productions -password EIlfLjztnPvuJuAZha1kbEyUlApH8SqDtDqOfg5t -cache-dir /content/cache -ui text -compute-method GPU -gpu OPTIX_0 -rendertime 120 </dev/null >/dev/null 2>&1" | |
], | |
"execution_count": null, | |
"outputs": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment