-
Notifications
You must be signed in to change notification settings - Fork 3
Makefiles
Daniel Lopez edited this page Apr 4, 2021
·
1 revision
For this example, we'll be using the
cool_scene
stage found in the template.
cool_scene_render: blender/cool_scene.blend
python3 scripts/render.py --stage cool_scene
- Add an extra step in
Makefile
found at root dir. - If you're rendering a blender file:
- add the blend file as a dependency to that step
- ensure the arg for
--stage
is the same name as the stage inconfig.yaml
- save and run
make cool_scene_render
For this example, we'll be using the
scripts/get_path.py
python file found in the template.
get_paths:
docker run --rm -v ${PWD}/blender/:/blender/ -v ${PWD}/scripts:/scripts -v ${PWD}/config.yaml:/config.yaml tennisgazelle/blender-pipeline:latest blender/cool_scene.blend --python scripts/get_path.py
- Add an extra step inside
Makefile
found at root dir. - Place the command found above inside it
bash | what it means |
---|---|
docker run --rm -v |
run docker on an image that will execute and then die |
-v ${PWD}/somedir/:/somedir/ |
copy this directory to the same directory inside the docker container/image; make sure to do this for both your blender directories, your config, your script, and any other dependencies you need to run |
tennisgazelle/blender-pipeline:latest |
the docker image specific for this |
blender/cool_scene.blend |
the blender file to render (the path is technically within the dockerfile, so wherever you place it from where you specify it (see a few bullet points ago)) |
--python scripts/get_path.py |
the file (again, technically a relative path from within the docker container) |