This is a basic example for the installation of Mistika Workflows inside a docker container, on a Linux headless server.
This example is for Ubuntu server, but it should be similar for other linux distros.
PREREQUISITES:
Install Ubuntu server : For this example let's suppose that you have already installed ubuntu server using the default settings, also creating a user named "mistika" which you will login (all commands below appearing without sudo are executed as the user mistika... )
Install a (modern) NVIDIA GPU in your system (Mistika Workflows on linux can not work without it) and power on the server.
CONFIGURATION INSTRUCTIONS:
1. Install NVIDIA driver:
sudo ubuntu-drivers install
sudo reboot
Check that the gpu is regognized:
nvidia-smi
(it should show your gpu model)
2. Install Docker and give access to your user
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
reboot
NOTE: If you only want to install a license server skip the next two points and go to point 5.
3. Install X11 software
sudo apt install mesa-utils xorg openbox mesa-utils xorg openbox x11vnc dolphin libqt5svg5 breeze-icon-theme
sudo nvidia-xconfig
4. Install nvidia-container-kit for docker
(Note: based on nvidia official instructions here )
sudo apt-get update && sudo apt-get install -y --no-install-recommends ca-certificates curl gnupg2
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg && curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.18.2-1
sudo apt-get install -y nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION}libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION}
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
sudo nvidia-ctk runtime configure --runtime=containerd
sudo systemctl restart containerd
5. Install Mistika Workflows docker image
Create a text file named compose.yml, and copy/paste the compose.yml content provided in point 3 of this page: https://hub.docker.com/r/sgomistika/mistikaworkflows
Start the containers:
docker compose up -d
The first time you execute this it will take a long while donwloading the docker image. But posterior executions should be very fast.
That will create two containers, sgoLicenseServer and MistikaWorkflows. The license server process (sgoLicenseServer.bin) is started automatically in the first container, but the workflows application is not started on its own just yet (we will do it in the next point):
6. Running Mistika Workflows in the container
Before we can run Mistika Workflows in a container we will need to start the Xorg software that we have installed before (this is needed in order to obtain an OpenGL context),. We will open it without listening to any network ports (for security reasons):
sudo Xorg -nolisten tcp &
That is all we need in order to execute a workflows render, for example now you could execute commands like this:
docker exec MistikaWorkflows workflows -r pathToYourWorkflowsFile.mwf
If you also want to open the full GUI of Mistika Workflows (or the Activation Tool), then you will need to start a windows manager:
export DISPLAY=:0
sudo openbox &
And we also need an vnc server in order to see the GUI remotely. We will use x11vnc in this example:
First time you need to create a password:
x11vnc -storepasswd
(type a password, by default it will be stored in .vnc/passwd file in encrypted form)
From now, you can start the vnc server with this command:
x11vnc -rfbauth .vnc/passwd -display :0 --forever &
Then use an vnc client to connect to the host from any other computer, so that you can see the X session remotely. For example you can use this vnc client:
Now let's launch workflows in the container, and the Mistika Workflows GUI will be displayed in your vnc client:
docker exec MistikaWorkflows workflows
Or if you need to manage your licenses:
docker exec MistikaWorkflows sgoActivationTool
To stop everything:
docker compose down -t 0
sudo killall Xorg
Note that the compose.yml above only configures a few container internal volumes in order to make changes to the configuration files persistent. You will also need to add bind mounts (in the workflows volume section) in order to give the container access to the storage paths where your media files are located, and the potential render destinations (they will be available in the next time that you execute docker compose up )