Use Cases
Create Template With Your Own ...

Example 1 - How to Create Template for Blender

9min

Finding a docker image that allows customers to use Blender like a remote desktop while Blender runs in a container was tricky. However, Kasm Technologies offers remote desktops that can be accessed through your web browser and has released a lot of docker images including a blender image that allows you to run blender in a container and access it through a web browser.

You can follow along with kasmweb's page in dockerhub for their blender image: https://hub.docker.com/r/kasmweb/blender/.

You can also follow along with the Blender template by going to this Blender Template and clicking the blue "kasmweb/blender in the cloud" hyperlink next to Template.

Selectorsearch
Selectorsearch


Step 1 - Run Locally With Docker Run Command in Container Repository Page

In the Stand-alone Deployment section, there is a docker run command that will pull the kasmweb/blender:1.14.0 image and run container from that image with some additional commands. I used that run command to run this blender container on my local machine so I can understand how it works before I can figure how to convert it to run in Vast's environment.

Stand Alone Cmd Cut
Stand Alone Cmd Cut


Step 2 - Choose Suitable Image Tag

I chose to use the tag 1.14.0 because this will give me the release version of this image.

Tags
Tags


Step 3 - Specify your Image and Tag Combination

Blenderimage
Blenderimage


I started to create a template and specified that the kasmweb/blender:1.14.0 image would be pulled in on one of Vast's machines.

Step 4 - Add Your Docker Options and Environment

Blenderoptions
Blenderoptions


I added -p 6901:6901 -e VNC_PW=password to the Docker Options section so the docker run command would be executed with these options on one of Vast's machines, similar to the run command on that page in Docker Hub.

I also added environment variables "-e OPEN_BUTTON_PORT=6901 -e OPEN_BUTTON_TOKEN=1" so when I press the Open button once the instance is ready, Blender will be opened.

Step 5 - Select the Jupyter Launch Mode

Blenderlaunchmode
Blenderlaunchmode


I selected the Launch Mode as Jupyter for this use case because I wasn't able to directly upload files from my local machine to Blender and download from Blender to my local machine while testing. However, if I uploaded a file like 100_color_vortex.blend to the instance/container through Jupyter's interface, I could access and open that file in Blender.

Open File
Open File

Original Upload Blend File To Jupyter
Original Upload Blend File To Jupyter


Step 6 - Fill Out On-start Script section

Blenderonstart
Blenderonstart


In the on-start script section, we added commands to be able to use this image to build and run as a standalone container in Vast's environment, even though the image/container is designed for the KasmWorkspaces environment.

Text


We appended environment variables to /etc/environment file in our on-start section.

This makes environment variables available to all users and processes and ensures they are persisted even if our instance/docker container is rebooted. We suggest doing the same for your templates.

In this case, we also had to make the directory "/home/kasm-user/Desktop", which I expected would be already be there. Certain docker images might not be completely ready to create a running container.

We also had to read the source code and make changes to some of the entrypoint scripts to get this container running as a standalone container and work within Vast.

The repo with this blender image's Dockerfile could be found:https://github.com/kasmtech/workspaces-images/blob/develop/dockerfile-kasm-blender.

We didn't need to specify container repository server, username, and password.

Step 7 - Finish Creating Template

Blendersave
Blendersave


We finished creating this template by specifying the template name and description.

You can select and save to go to a screen to select a GPU instance and save your template.

Selectedsearch
Selectedsearch