You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use your images with VS Code and the Remote-Containers add-on. This requires some setup which includes a devcontainer.json file to specify the run command. I thought that someone else might find this useful, so here's a short instruction that you could add to the wiki pages.
I've also added the functionality of having the Blender configuration persist between runs.
Cheers :)
Instructions
Create a project folder and open it in VS Code. Add a .devcontainer folder.
Create a devcontainer.json file inside it with the content as shown below.
Also create an empty .config/blender folder.
Execute the container by pressing Ctrl+⇧Shift+P and run the command Remote-Containers: Reopen in Container.
From the integrated terminal, run blender.
Folder structure
This is the folder structure before running the container.
Folder structure after execution
After running the container once, including running Blender, the folder structure should look something similar to this:
{"name": "blender",//// Use this if you use a custom image.//"build": {// "dockerfile": "../Docker/Dockerfile",// },// Use this if you only need to run the image directly. "image": "nytimes/blender:latest","settings": {"terminal.integrated.shell.linux": "/bin/bash"},"workspaceMount": "source=${localWorkspaceFolder},target=/root/${localWorkspaceFolderBasename},type=bind","workspaceFolder": "/root/${localWorkspaceFolderBasename}",// We also mount the config folder from the host system. This way, settings // inside the container are kept between runs."mounts": ["source=${localWorkspaceFolder}/.devcontainer/.config/blender,target=/root/.config/blender/,type=bind"],"runArgs": ["-it","--rm",// Removes the container on exit. Remove this if you want the container to keep running."--gpus","all","-v","/tmp/.X11-unix:/tmp/.X11-unix:rw","-v","/tmp/.docker.xauth:/tmp/.docker.xauth:rw","-e","DISPLAY=${localEnv:DISPLAY}","-e","XAUTHORITY=/tmp/.docker.xauth","--device","/dev/dri/card0:/dev/dri/card0"],"extensions": []}
Issues
I've tried doing this is VS Codium (the open source version of VS Code), and I couldn't get it to work.
The text was updated successfully, but these errors were encountered:
I use your images with VS Code and the Remote-Containers add-on. This requires some setup which includes a
devcontainer.json
file to specify therun
command. I thought that someone else might find this useful, so here's a short instruction that you could add to the wiki pages.I've also added the functionality of having the Blender configuration persist between runs.
Cheers :)
Instructions
.devcontainer
folder.devcontainer.json
file inside it with the content as shown below..config/blender
folder.Ctrl+⇧Shift+P
and run the commandRemote-Containers: Reopen in Container
.blender
.Folder structure
This is the folder structure before running the container.
Folder structure after execution
After running the container once, including running Blender, the folder structure should look something similar to this:devcontainer.json
Issues
I've tried doing this is VS Codium (the open source version of VS Code), and I couldn't get it to work.
The text was updated successfully, but these errors were encountered: