利用者・トーク:Jbakker/Blender docker

提供: wiki
< 利用者・トーク:Jbakker
2018年6月29日 (金) 06:15時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

I've had some success running Blender from within Docker using this method: http://stackoverflow.com/a/28971413/320036

Once you have a user set up in the image with the same UID as your own, you can start Blender like this:

> sudo docker run -it --rm \
   -e DISPLAY=$DISPLAY \
   -v /tmp/.X11-unix:/tmp/.X11-unix \
   -v ~/Documents:/home/developer/Documents \
   -v ~/.config/blender:/home/developer/.config/blender \
   blender:2.75 \
   ./build_linux/bin/blender

That can be baked into a docker-compose.yml file:

blender:
  image: blender:2.75
  environment:
    DISPLAY: ":0"
  volumes:
   - /tmp/.X11-unix:/tmp/.X11-unix
   - /home/user/.config/blender:/home/developer/.config/blender
   - /home/user/Documents:/home/developer/Documents
  command: [/home/developer/build_linux/bin/blender]

Which is started like this:

sudo docker-compose run --rm blender

The only problem is I seem to have no 3D acceleration, but it still runs well (software rendering I guess).