Skip to content

Instantly share code, notes, and snippets.

View theycallmeloki's full-sized avatar

theycallmeloki theycallmeloki

View GitHub Profile
@theycallmeloki
theycallmeloki / pachctl-pipe-jq.json
Created June 3, 2022 12:02
Output from pachctl list job piped to jq
{
"job": {
"id": "f5bbb212ac3445c18febf33567edef31"
},
"transform": {
"image": "laneone/ffmpeg-simpleconvert:latest",
"cmd": [
"python3",
"/converter.py"
],
@theycallmeloki
theycallmeloki / express-cli-exec.js
Last active June 3, 2022 12:00
Quick way to use a CLI from a node express app
// the utility function to query pachyderm job completion data
const runPachctlCommand = (args: string[], callback: Function) => {
console.log('Running 🐘🐘🐘 Pachctl 🐘🐘🐘');
args.push('--raw');
args.push('|');
args.push('jq');
// might need to make this next line `-sr` depending on
// whether you want to slurp or not
@theycallmeloki
theycallmeloki / merger.py
Created March 31, 2022 14:52
split-blender-merger - merger.py
import os
import sys
import re
import cv2
pfs_source_renderer = f"/pfs/{sys.argv[1]}"
def getXList(tiles):
mergeFrame = {}
@theycallmeloki
theycallmeloki / merger.json
Created March 31, 2022 14:51
split-blender-merger - merger.json
{
"pipeline": {
"name": "merger"
},
"input": {
"pfs": {
"glob": "/*/",
"repo": "renderer"
}
},
@theycallmeloki
theycallmeloki / blend_render.py
Created March 31, 2022 14:11
split-blender-renderer - blend_render.py
import bpy
import sys
import json
job_id = sys.argv[10]
tile_id = sys.argv[11]
pfs_source_blends = sys.argv[12]
pfs_source_splitter = sys.argv[13]
f = json.loads(open(f'{pfs_source_splitter}/{job_id}/{tile_id}').read())
@theycallmeloki
theycallmeloki / render.py
Last active March 31, 2022 14:41
split-blender-render - render.py
def render_blend(blend_source, job_source):
print(job_source)
tile_id = job_source.split("/")[4]
f = json.loads(open(job_source).read())
job_id = f["jobId"]
frame = f["frame"]
start_x = f["startX"]
start_y = f["startY"]
@theycallmeloki
theycallmeloki / blend_splitter.py
Last active March 31, 2022 13:52
split-blender-renderer - blend_splitter.py
import bpy
import os
import json
import sys
blendfile = sys.argv[6].rstrip(".blend")
pfs_source = sys.argv[7]
presplit = f'{pfs_source}/{blendfile}'
blend_params = {
@theycallmeloki
theycallmeloki / blend_render.py
Created March 31, 2022 12:56
simple-blender-renderer - blend_render.py
import bpy
import sys
import json
job_id = sys.argv[10]
frame_id = sys.argv[11]
pfs_source_blends = sys.argv[12]
pfs_source_splitter = sys.argv[13]
f = json.loads(open(f'{pfs_source_splitter}/{job_id}/{frame_id}').read())
@theycallmeloki
theycallmeloki / render.py
Created March 31, 2022 12:53
simple-blender-renderer - render.py
import os
import sys
import json
import subprocess
import re
pfs_source_blends = f"/pfs/{sys.argv[1]}"
pfs_source_splitter = ""
try:
pfs_source_splitter = f"/pfs/{sys.argv[2]}"
@theycallmeloki
theycallmeloki / renderer.json
Created March 31, 2022 12:45
simple-blender-renderer - renderer.json
{
"pipeline": {
"name": "renderer"
},
"input": {
"cross": [
{
"pfs": {
"glob": "/*",
"repo": "blends"