Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GPU in Render Animation Worker Job #7445

Closed
2 tasks
philippotto opened this issue Nov 20, 2023 · 6 comments
Closed
2 tasks

Use GPU in Render Animation Worker Job #7445

philippotto opened this issue Nov 20, 2023 · 6 comments
Assignees

Comments

@philippotto
Copy link
Member

Detailed Description

As a follow-up to #7348, speed might be improvable by using the GPU in the worker job.

Context

  • Specific to long-running jobs (set jobsEnabled=true in application.conf)
  • Specific to webknossos.org (set isDemoInstance=true in application.conf)
@hotzenklotz
Copy link
Member

hotzenklotz commented Nov 23, 2023

Time measurements for a single frame based on job 655b4d0e01000026094d9893__render_animation__1700482319547

  • Cycles @ Blender 3.3 CPU NYT-Docker on Humerus : 01:13.68
  • Eevee @ Blender 3.6.5 CPU on ???: 03:50.79
  • Cycles @ native Blender 3.6.5 CPU Humerus: 01:05.13
  • Eevee @ native Blender 3.6.5 GPU Euphorix: 00:01.12

@philippotto
Copy link
Member Author

  • Eevee @ native Blender 3.6.5 GPU Euphorix: 00:01.12

Awesome! So, very good news, right?

@hotzenklotz
Copy link
Member

Awesome! So, very good news, right?

Well... we already knew that GPU support is quick. But the WK worker is no running a on a GPU server. Nor was this in Docker....

@philippotto
Copy link
Member Author

Ok, I see..

@hotzenklotz
Copy link
Member

hotzenklotz commented Nov 27, 2023

With the nvidia-container-toolkit installed you can just run the regular wk-worker Docker container to benefit from GPU support, e.g.

docker run \
    -v $(pwd):$(pwd) \
    -w $(pwd) \
    -u $(id -u ${USER}):$(id -g ${USER}) \
    --rm \
    --gpus all  \
    --runtime=nvidia \
    --privileged \
    -e NVIDIA_VISIBLE_DEVICES=all \
    -e NVIDIA_DRIVER_CAPABILITIES=display,compute \
    -v /run/nvidia-persistenced/socket:/run/nvidia-persistenced/socket \
    -v /var/run/nvidia-fabricmanager/socket:/var/run/nvidia-fabricmanager/socket \
    -v /tmp/nvidia-mps:/tmp/nvidia-mps \
    scalableminds/webknossos-worker:23.11.1.post15.dev0--e32a27ebe \
    blender --background --python create_blender_animation.py

Ca. 0.13s per frame on Euphorix with Geforce GTX 1080

@hotzenklotz
Copy link
Member

Blender had a peak usage of slightly more then 900MB of VRAM for my test dataset (2 large meshes).

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants