Giter Site home page Giter Site logo

fat-tire / resolve Goto Github PK

View Code? Open in Web Editor NEW
138.0 5.0 13.0 213 KB

Container scripts to build and run DaVinci Resolve [Studio] for Linux using Docker or Podman

License: MIT License

Dockerfile 24.31% Shell 75.69%
nle podman docker davinci-resolve container ubuntu-container video-editor

resolve's Introduction

Containerizing DaVinci Resolve [Studio] in x86_64 Linux w/NVIDIA

Contents

Introduction

Note: Please read this in its entirety, including caveats and disclaimers, to understand what you're doing and some of the risks involved. This document was initially written with Ubuntu Linux users in mind, but others running distributions including Mint, PopOS, RockyOS, and more have reported success too.

What is DaVinci Resolve?

DaVinci Resolve is a popular, powerful free (and paid "Studio" version) non-linear editor for Linux, Mac, and Windows.

DaVinci Resolve was designed to be run on the now-deprecated CentOS Linux distribution. Non-Centos Linux users, such as Ubuntu users who want to run DaVinci Resolve, have traditionally repackaged the official DaVinci Resolve release to a .deb file with a script by Daniel Tufvessons and installed from there.

But running DaVinci Resolve in the "wrong" distribution can reportedly create headaches when updating-- the repackaging script may have to be rewritten to support the new release, there may be library incompatibilities, etc.

There must be another way...

Let's use a container!

Containers allow (among other things) multiple distributions of Linux to run simultaneously on a single machine. The "host", in my case a Ubuntu installation, runs a containerized version of the "guest" installation, in this case CentOS. It's a little bit like a virtual machine, but unlike a virtual machine, the installations of Linux share the same kernel. Still, the stuff running in CentOS is semi-isolated and usually doesn't know it's running inside another operating system.

So the big idea here is to use Ubuntu/Mint/PopOS/etc as your "host" computer and put DaVinci Resolve in a CentOS container where it can run in its own native environment with the files-- libraries and such-- it expects.

The goal will be to make it as seamless as possible with the host computer.

Several years ago, VertexStudio committed a method for containerizing DaVinci Resolve to github. Unfortunately, it didn't quite work for me on newer versions of Ubuntu/Resolve. Still, that earlier repository was very helpful as a reference, so thanks to @rozgo for the great write-up in his README.md, which you should probably look at as well for a bit of context and some more info on why this might be worthwhile, and some more tips.

So, to sum up-- what's the big advantage of using a container?

Besides running DaVinci Resolve in its actual intended operating system (CentOS) without ever leaving the comfort of your own non-Centos Linux machine, containers offer some other big advantages:

For one, you can maintain multiple versions of DaVinci Resolve on your system without having to reformat everything and reinstall. How? Well, say a new version comes out and you want to test it out-- you can just pop in a new resolve .zip, rebuild a new container image with a single command, and quickly give it a spin-- using your existing projects and media. If you don't like what you see, you can instantly revert to the previous version (assuming the new version didn't just trash your project or anything, so back up first!)

You can also (theoretically, I haven't tried this) switch between the free and paid version or, hardware allowing, run them both simultaneously-- though maybe not on the same project files at the same time. That could be nuts.

Containerized, DaVinci Resolve can also be isolated from the Internet while the rest of your computer continues to be connected. And once the container image is built, it can also be quickly moved onto another machine without having to re-set it all up again.

Cool, cool. I'm sold on at least trying this idea. But which container system to use? Linux has a few.

Yes, there's lxd and lxc and snap and- y'know, let's narrow it down to two really popular ones-- Docker and Podman.

Docker is by far most popular, but requires a daemon with root access be running all the time. Hmm. This could have security implications, and may unnecessarily use system resources even when no containers are running.

RedHat has developed an alternative, mostly-Docker-compatible system called the Pod Manager tool, or Podman. One advantage of Podman is that containers can be run by a single user without ever requiring root. When running Resolve, we don't ever need root access, so this is my favorite solution.

Both Podman and Docker are available in most Linux distributions and can be installed easily. On Debian-derived Linux such as Ubuntu, Mint, and PopOS, this is accomplished via apt.

Can't both Docker AND Podman work?

Sure, why not. If you have Podman running and prefer that, great. Or use Docker. Whatever.

So here's the plan on building the image-- we'll start with the official CentOS Stream, then update the packages and add some dependencies needed for DaVinci Resolve. Y'know, drivers and libraries and stuff. Then install DaVinci Resolve from the official zip file you can get from the website. Then create a user called "resolve" in the CentOS container. That's the user who will run resolve in CentOS.

Wait. A user named "resolve" will run Resolve? But I want to run it! How will I access the projects and stuff?

No problem-- instead of saving data such as our projects and the media IN the Centos container, we'll save it in our host computer's folders instead. That we can easily interact with it, back it up, and treat it like any other data on the host.

How, you ask? We'll map the folders!

Mapping directories (that is, bind-mounting folders) from CentOS to the host

Containers like Docker and Podman commonly use "bind mounts" to connect a directory in your host Linux's account to be accessed from the container as if it was "native" to the container itself. This gives the container access to certain folders that will persist in your host-- even when the container isn't running. Why do this? To retain your projects, cached rendered video, or raw footage-- in your host! This also allows X11 Xwindows and sound to "pass through" from CentOS to the host and even provides access to fonts you've installed locally on the host to the CentOS install of Resolve!

In other words it's cool.

Sounds cool.

That's what I just said. In fact, if we map everything right-- the container shouldn't even need to store ANYTHING. It should just run, and anything we care to save we will save on the host. In fact, the container will be "ephemeral", meaning we won't retain anything there-- the stuff we care about will be on the directories on the host. We'll start the container fresh every time.

I've set up some basic mounts in this repo-- but feel free to move those mapped folders around to whatever is most convenient. They're all set up in the resolve.sh file used to launch DaVinci Resolve.

The mounted directories will be in resolve/mounts. One special directory in there of note is resolve/mounts/resolve-home, which is connected to the "home directory" of the user named resolve inside the container. Again, that's the CentOS user that's actually running DaVinci Resolve. A nice side-benefit of doing this is that this folder isolates the Resolve-specific user stuff, keeping it separate from your personal home space stuff. It would be all mingled together if you ran DaVinci Resolve right on the host machine.

BTW, in Podman, to enable the files to be accessed by both the host and the container without running into ownership and permissions issues, I do allow the "resolve" container user to access the group name for the host (usually the name of the user). There's probaby a way to isolate these namespaces completely, but the way I set it up works for me. If you absolutely don't want the container to know anything about the host for some reason, well, you'll have to set it up better than I did!

A quick note on security in general-- this container setup is not focused on completely isolating the CentOS container from the host-- the goal is mostly to make Resolve work. Both OSes can share resources and services such as windows integration, USB, keyboard, group names, network IPs, copy/paste etc. There are nice benefits to using the container like limiting network access, file separation, etc. but this is not designed to be bulletproof. If for some weird reason you do need the container to be totally and completely isolated from the host, see here and here. If you have a commit to address isolation or security concerns without sacrificing functionality or performance, please submit a pull request!

USB dongles & Registration Codes

The default startup script resolve.sh also maps /dev/bus/usb from the host to the CentOS DaVinci Resolve container. This should allow paid DaVinci Resolve Studio users who use the dongle to have their USB dongles recognized.

If you use Registration Codes instead, there's information below about trying to use them, including the need to enable Internet access to your container (I've turned off Internet access by default). Please read the warning about how this is completely untested and you must proceed entirely at your own risk.

Speed editor and other USB hardware

I also set up the resolve.sh startup script to bind mount all the HID /dev/hidraw# device files to allow the speed editor hardware and I assume other keyboards and input devices to work. At least it did for me.

Will this work with other specialized editing/camera/etc hardware? Not sure!

Instructions

What you'll need to try this

  • A x86_64 PC (16GB or so. Blackmagic Design says 32GB RAM minimum for Studio but whatever) with a fairly recent NVIDIA > 4GB GPU + a USB port (if using the Dongle).
  • Ubuntu/Debian/PopOS/Mint/RockyOS/?? installed on that computer (I'm using Ubuntu 22.04 LTS). I have not yet tested on non-GNOME versions of Ubuntu (Xubuntu, Kubuntu, Lubuntu, etc.)
  • Optional: A USB Dongle to enable the paid DaVinci Resolve Studio
  • Optional: The DaVinci Resolve Speed Editor (USB only-- see below about Bluetooth operation)
  • Optional: A registration code-- but again try this at your own risk/peril!

First add a udev rules file

On most Linux systems, you'll need to grant special access to the USB devices, so adding a 70-blackmagic-design.rules udev file on the host computer is a good idea. An example file is provided in this repository. Just copy 70-blackmagic-design.rules to /etc/udev/rules.d/ or wherever udev rule files should be put on your Linux distribution.

Installing, step-by-step

  1. On the Linux host, install the latest official proprietary NVIDIA drivers. In Ubuntu, you can do this in the Software & Updates app, in the Additional Drivers tab. Reboot and make sure everything works okay. I have the computer running in "discrete" mode (set in the BIOS). Not sure if this is needed. Also, I am logged in using X11 (Xwindows) in the Desktop. Not sure how well Wayland will work, although it theoretically should be compatible. (You can switch your desktop from Wayland to X11 in Ubuntu's account login screen.) Other versions of Linux may have their own method of installing the drivers, so time to Google that!

  2. Install Podman [or Docker] and and other dependencies with this command (on distributions that support apt:

    sudo apt install -y podman fuse-overlayfs nvidia-container-runtime crun

    (Alternately, you can apt install -y docker instead of podman. But IMO Podman is better/safer.)

  3. Move or git clone this repository (you'll want Dockerfile, resolve.sh, build.sh, .gitignore, .dockerignore, env-set.sh, this README.md, etc.) somewhere like ~/containers/resolve, so let's just go with that for now.

  4. Download the official DaVinci Resolve .zip file from Blackmagic Design, the makers of DaVinci Resolve.

  5. Move that .zip file to ~/containers/resolve/and rename it to be in this format:

    DaVinci_Resolve_Studio_17.4.2_Linux.zip

    (You can leave out the _Studio part if you're using the free version.)

  6. Change directory (cd) into ~/containers/resolve and build the resolve container image:

    cd ~/containers/resolve

    ./build.sh

    NOTE: Part of this building/installation process includes agreeing to certain terms and conditions from the makers of DaVinci Resolve [Studio]. Please be sure to review these terms and agree to them before using DaVince Resolve [Studio]. You will be asked to agree when running ./build.sh.

  7. Now wait. The CentOS Stream system should be downloaded, updated, dependencies added, the DaVinci Resolve.zip copied in there and everything hopefully will be installed.

    Assuming no errors occur, you're (fingers-crossed) ready to run DaVinci Resolve [Studio] now.

    NOTE: In the future, when NVIDIA releases newer drivers, you'll probably want to keep your CentOS container's drivers "in sync" with the one on the host by rebuilding the container.

  8. To be sure the container's runtime is properly NVIDIA GPU-enabled, try this command:

    ./resolve.sh nvidia-smi

    This should output an "information box" from the CentOS container showing the NVIDIA stuff is running successfully there and that it is able to access the GPU. If it doesn't look right-- whoops. Not sure what to tell ya, except check out NVIDIA's documentation here or reddit or maybe the Blackmagic Design forums for suggestions on making it work.

    To simplify troubleshooting in this case, you can try a "known working" NVIDIA container rather than the CentOS one you just built. (Note this involves a pretty big download.)

    sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

    or

    podman run --rm nvidia/cuda:11.0-base nvidia-smi

    This should output an "info box". If it doesn't, your problem is probably on the host. If it does show the box, the problem is probably something about the CentOS container image.

  9. Assuming you're good to go, try running Resolve!

    If you run resolve.sh as a regular user on the host with:

    ./resolve.sh

    ...it MAY just work. The first time it takes a bit longer as it's setting stuff up.

    Or it may crash. If it crashes-- see the Troubleshooting section below. You probably just have a few lines to change or something.

    But let's assume for now it worked...

Make a Dock desktop shortcut

If it worked, you probably don't want to have to type a command every time you want to run it. Make a desktop shortcut instead!

  1. Find a nice image to use as a dock icon and put it in ~/.local/share/icons/DV_Resolve.png You may be able to copy the desktop image from the running container with this command: podman cp resolve_container:/opt/resolve/graphics/DV_Resolve.png ~/.local/share/icons/DV_Resolve.png (Replace podman with docker if that's what you're using)
  2. Edit the included resolve.desktop file's "Exec" line to run resolve.sh in the correct location just as you were typing it (including the full path to ./resolve.sh) and copy the resolve.desktop file to ~/.local/share/applications/resolve.desktop
  3. In the GNOME desktop, click the Show Applications icon on the launcher or press the the Super key (which often has a Windows logo) + A.
  4. Find the DaVinci Resolve icon you created (or you can do a search for "resolve")
  5. Right-click the icon and choose "Add to Favorites"
  6. At this point the icon should appear in your dock. Click once to launch it.

Troubleshooting

I can't move or resize Resolve's main window! It's locked in place!

Try holding down the Super key (which often has a Windows logo). You should then be able to move or resize the DaVinci Resolve window. A center-button mouse press should also bring options for minimizing, maximizing, etc.

The windows are way too small (or too large)!

Add this line to resolve.sh and adjust the value (try 1, 2, 1.5, etc.) to adjust how big Resolve appears on your screen:

 --env QT_SCALE_FACTOR=2 \

Why doesn't drag and drop work from the host?

Because, except for those directories bind-mounted from the host to the container, the container doesn't know about the host's desktop-- it's running in CentOS, remember? You can share screen and sound output and mouse/keyboard/speed editor input, copy/paste text but that's about it. There may be a way via X11 or GNOME Desktop standards to enable drag and drop with a container, but if so I don't know anything about it.

Resolve doesn't have network access!

By default, I opted to isolate the container from the Internet. If you want to give it the same Internet access as your host computer, set an environment variable when running ./resolve.sh like this:

 RESOLVE_NETWORK="host" ./resolve.sh

This will use the host's network stack. You can make this behavior persist for the session by setting the environment variable:

 export RESOLVE_NETWORK="host"

You can add that line to .bashrc (or ~/.zshrc, etc.) or the resolve.desktop file so that it is the setting every time. (You can also create a resolve.rc file with this and other custom settings and runtime instructions. More on that below.)

NOTE: If you are enabling the Internet to activate a registration code, read the next bit!

Can I use a registration code to activate Resolve Studio in the container?

IMPORTANT NOTICE: I HAVE NOT TESTED THE DAVINCI RESOLVE STUDIO REGISTRATION CODES-- ONLY THE DONGLES-- FROM INSIDE A CONTAINER. I DO NOT KNOW HOW THE REGISTRATION CODES WORKS NOR HOW IT WILL HANDLE CONTAINERS. TRY THIS ENTIRELY AT YOUR OWN RISK! I AM NOT RESPONSIBLE FOR LOST/WASTED CODES!

If you are using Resolve Studio with a registration code, I believe the container should need Internet access so Resolve can contact Blackmagic Design's servers. I have not tested this functionality in any way, and there may be unforeseen consequences of using a registration code from within a container!

For example-- one way a unique machine can be identified in Linux is by looking at the value of /etc/machine-id. Your host has one machine-id value, but it seems weird to pass through the same machine-id on a container. So instead I made it so the CentOS container you create will derive its machine-id specifically from your host computer's machine-id if it exists (without being identical) and store this derived machine-id in your mounts directory (named appropriately enough, container-machine-id). Using this should make it so that running newly-built images with updated resolve versions would be consistent at least in terms of the machine-id.

Again, I have no idea if the machine-id is in any way used to identify your computer by Blackmagic Design or if a new image/container might be considered a unique machine and break the activation, so again, USING REGISTRATION CODES WITHIN CONTAINERS IS ENTIRELY AT YOUR OWN RISK AND DO NOT BLAME ANYONE BUT YOURSELF IF THERE ARE ISSUES, INCLUDING THE POSSIBILITY OF LOSING YOUR REGISTRATION CODE(S) ENTIRELY! PLEASE CONSULT WITH BLACKMAGIC DESIGN SUPPORT TO ASK WHAT THE APPROPRIATE WAY TO MANAGE YOUR ACTIVATIONS SHOULD BE AND WHAT THE POLICIES AND BEHAVIOR ARE FOR CONTAINERIZED INSTALLATIONS OF DAVINCI RESOLVE [STUDIO].

According to some on Reddit, if you register on a new computer, your older activations will be auto-deactivated.

Hope that's clear. Post on reddit or something if you have thoughts on this as well as any code adjustments that are needed, which can be submitted as a pull request.

Does the speed editor work with a Bluetooth connection rather than USB?

Not yet. This seems to be an issue not with containers but with either the speed editor firmware or in DaVinci Resolve itself. Wait for an update I guess. Becuase it doesn't seem to work yet, this container does not yet install or configure the avahi, dbus, and bluez-hid2hci packages which it might need for future Bluetooth support.

Can I update the speed editor's firmware with this container?

I was able to update the firmware on the Speed Editor from within the container via USB by manually running the Control Panels Setup:

 ./resolve.sh /bin/bash

You'll get a shell running in the container. Now type:

 /opt/resolve/DaVinci\ Control\ Panels\ Setup/DaVinci\ Control\ Panels\ Setup

What about using postgresql so multiple editors can connect to work on one project?

This script runs the basic single-user installation of DaVinci Resolve with the file-based database, not postgresql. If you want to use the postgresql database, you'll have to modify the dockerfile to install and configure the database for you and open a port for access. Should not be too difficult, but perhaps someone else might try it?

What version of the NVIDIA driver is the container using?

By default it should detect the version YOU were running when you created it. In the future, you'll probably want to rebuild the container (which again, shouldn't affect the stuff inside your mounts directory since that's really on your host computer) when you update your host's NVIDIA driver so that they match again. This can be done by simply re-running build.sh again.

How can I poke around the CentOS container from the command line?

As shown above-- instead of ./resolve.sh try ./resolve.sh /bin/bash to get a prompt in CentOS. You can get a root shell (no password needed) by typing sudo bash. (If you want to disable "resolve"'s access to root privileges or change its password from "resolve", you just need to change the Dockerfile lines.)

Be advised that changes you make to a non-bind mounted directory inside the container will be GONE the next time you run the container, so if you want to keep the changes, bind-mount the directory where you're making changes to somewhere on your host. This is because by default changes are abandoned and a "fresh" version of the container is run every time. (In other words, I tried to make it ephemeral.)

Will the container work with other distributions of Linux besides Ubuntu?

Yes! This has been confirmed working in the following distributions:

  • Ubuntu (as host)
  • PopOS (as host)
  • Mint (as host)
  • Rocky Linux (as host and the continer OS)
  • Alma (as host and container OS)

It probably will work in any distribution that derives from Debian. Untested are the various non-GNOME versions of Ubuntu (Xubuntu, Kubuntu, Lubuntu, etc.) It probably will not work on non x86_64 versions of Linux simply because (as far as I know) DaVinci Resolve is only available for that architecture.

Where should I put my raw media files or my plugins or new fonts or sound effects libraries etc.?

Fonts you can just add to your local host's user, but the rest-- that's kinda up to you. Does Resolve have a standard place for raw media? As I said, I'm new to Resolve.

The simpliest place for media may be to create a folder in the host's mounts/resolve-home (that is, the directory bind-mounted to the home directory of the "resolve" user in the container). Or you could use the mounts/Media, which is bind-mounted to opt/resolve/Media in the container.

There's a mount called "BlackMagicDesign/DaVinci Resolve" (that is, /var/BlackmagicDesign on the container) that I noticed has folders inside called Brushes, Config LUTs, etc. Maybe this is where system-wide plug-in stuff goes? I really don't know enough about Resolve yet to answer this.

As for sound effects libraries, etc-- I guess you can put those anywhere in the bind-mounted areas and then load them into a project (or point to them in the settings). ...or just add some more --mount lines in resolve.sh to map any location on your host to somewhere that you want to access it in the container.

From what I'm reading, you can even use --mount or --volume to access remote file servers, USB thumb drives, or some other fancy data store from inside the container. See the Docker/podman docs for more on how this would work. I have no clue.

How do I install the (royalty) free Blackmagic Sound Library?

If you enable the Internet, you should be able to install it right in Resolve, in Fairlight. However, if you want to download the zip and install it manually without the Internet enabled, here are steps that might work:

First, download the .zip fom Blackmagic Design. Then, start up the container with a shell:

 ./resolve.sh /bin/bash

Now that the container is running, in the host computer, copy the Sound Library zip into the container:

  cp Blackmagic_Fairlight_Sound_Library_Linux.zip resolve_container:/tmp/SL_Linux.zip

Now, in the container, do the installation--

  cd /tmp
  unzip SL_Linux.zip
  chmod u+x Blackmagic_Fairlight_Sound_Library_Linux.run
  mkdir /home/resolve/tmp  # the installer needs a big temporary directory
  TMPDIR=/home/resolve/tmp ./Blackmagic_Fairlight_Sound_Library_Linux.run

This should start up the installer. Agree to the license(s) and choose the destination for the library. The default puts it in /home/resolve/Movies. (On your host device, this will translate to mounts/resolve-home/Movies)

Be sure to run DaVinci Resolve to make sure the install was a success:

 /opt/resolve/bin/resolve

If it looks good, quit resolve, and then, still in the container, remove that tmp directory you created in your home directory. Double-check the rm -rf line as it will fully remove whatever you type next!

 rm -rf /home/resolve/tmp  # get rid of the temporary directory
 exit

That should be all there is to it!

Resolve won't restart!

Maybe there's an old container still running? You can use podman ps -a to check and podman rm --force resolve_container to kill a container if it's stuck. Obviously replace podman with docker if that's what you're using.

What's the deal with fonts? Where are they coming from?

There seems to be a bug in Resolve as of at least version 17.2.2 Build 4-- where the normal title generator can find BOTH the system and user-installed fonts, but the Fusion Titles and Title+ skip some. It seemed like the most reliable place for Resolve to find fonts was the container's /usr/share/fonts, so I mapped the host's local user fonts (.local/share/fonts) to /usr/share/fonts in the container-- that way my user fonts will be seen there instead of the container system fonts.

To maximize the number of fonts for Resolve, I was going to also direct the system fonts to the container's local user fonts directory, but holy cow-- there are SO MANY DEFAULT UBUNTU FONTS, including what seemed like an endless list of international fonts, that I ultimately figured the list was too long to be useful for most people.

So I made it an optional flag-- an environment variable called RESOLVE_ENABLE_HOST_SYSTEM_FONTS. Set that to "YES" and you'll get the system fonts. Skip it and you won't.

To add a local font to your host's account, just download the .ttf from somewhere like Google Fonts and double-click it to start the Fonts installer in Ubuntu. Basically this just copies the .ttf file to .local/share/fonts, which you can also do manually to have the fonts picked up by Resolve!

(You can also set the location where fonts are looked for via Fusion Settings in the Fusion menu.)

Can I put this repository folder somewhere other than ~/containers/resolve?

It should still work if you put this "resolve" repo in any directory, but in any case, the defaults are configurable.

Configuration

The RESOLVE_ environment variables

You can put your mounts in one place, your zip in another, and this repository in yet another!

Here are a few environment variables you can set when running build.sh and resolve.sh:

  • RESOLVE_ZIP -- Set this to point to your zip file. The default is the repository directory where build.sh is located.

  • RESOLVE_MOUNTS_PATH -- Set this to a directory where you want the mounts folder and its contents to be placed. The default is right in the repository where resolve.sh is running.

  • RESOLVE_BASE_CONTAINER_IMAGE -- Set this to something like "almalinux/8-base" or "almalinux/9-base" to use a container image other than the Centos Stream 8/9 default. See RESOLVE_NO_PIPEWIRE below to specify if you do not have pipewire installed on your host, though the build system will try to auto-detect this.

  • RESOLVE_NO_PIPEWIRE -- Set this to 1 to tell the build system when you (1) do not have pipewire (instead of, say, Pulseaudio) running on your host or if you are installing a container image that does not easily support Pipewire (such as an image descended from CentOS Stream 8 or earlier). Set to 0 for a container image that uses Pipewire. By default, the build system will try to detect a Pipewire-running host (and will consequently default to the CentOS Stream 9 container image), but should falls back to CentOS Stream 8 if Pipewire is not detected. If you manually override RESOLVE_BASE_CONTAINER_IMAGE above, you may need to set RESOLVE_NO_PIPEWIRE too, depending on which base container you use. Ubuntu defaults to using Pipewire starting with 22.10 "Kinetic Kudu", but older Ubuntu can also install it manually.

  • RESOLVE_BUILD_X264_ENCODER_PLUGIN -- Set this to 1 or "Y" to tell the build system to build an x264 encoder plug-in from source code. The latest source code for the videolan x264 library will be downloaded to the container and built. Then sample Blackmagic plugin code will be used to create the plugin, which will automatically be installed into place (at /opt/resolve/IOPlugins), and then the build tools and source code are removed. As this is still experimental, the default is NOT to build this. PLEASE NOTE THAT THE x264 CODEC LIBRARY SOURCE CODE IS LICENSED UNDER THE GNU GPL, and, consequently, any binary x264 plugin you build via this repository may only be distributed in compliance with this license. Please read the terms of the GPL for details. Moreover, it is unclear which license Blackmagic uses for the example encoder plugin code as it relates to re-distribution of source or binaries. (Is there a SDK-related license somewhere?) The sample code used to create the plugin is provided directly by Blackmagic as part of the Resolve [Studio] installer and is located in the /opt/resolve/Developer directory.

  • RESOLVE_TAG -- You can also set the container tag when building or running. So if you set RESOLVE_TAG="17.4.3-TESTING" when building, you'll end up with an image named resolve/17.4.3-TESTING. With resolve.sh, setting this variable will specify the tag you want to run. The default container tag when building is the Resolve version (also tagged "latest"). The default tag for running is "latest".

  • RESOLVE_LICENSE_AGREE (or RESOLVE_LICENSES_AGREE) -- set to "Y" or "YES" if you've already previously agreed to the license(s) and don't want to have to answer the question every time you ./build.sh.

  • RESOLVE_ENABLE_HOST_SYSTEM_FONTS -- As mentioned above, you can set this to "YES" to include the host fonts at /usr/share/fonts to the container's .local/share/fonts. Doing this however will significantly add many system fonts, many of which you probably won't need.

  • RESOLVE_NVIDIA_VERSION -- When building the container image, you can set this to the version of the NVIDIA driver you want to install in the CentOS container. The default is to match the version number of the NVIDIA driver on the host.

  • RESOLVE_NETWORK -- Set to "host" to use the host's Internet/network connectivity. Other network driver options are described in the Docker and Podman documentation. The default is "none", meaning the container will not have network access.

  • RESOLVE_CONTAINER_ENGINE -- Should you have both Podman and Docker installed in your host environment, Podman will always be used as your default. To specify a specific container engine, set RESOLVE_CONTAINER_ENGINE to either podman or docker.

  • RESOLVE_USER_ID -- Set this to the desired user ID ("UID") of the user (who is named "resolve", remember) running within the container. By default, "resolve"'s UID is set to match the UID of the user who runs the ./build.sh command. However, it is possible that you will build the container with one account and run it with another, and Docker in particular may prefer that the host user UID and the "resolve" container user's UID match. So, if you are having issues with file permissions or file ownership on mounted volumes, try adjusting this variable.

  • RESOLVE_BIND_SOURCES and RESOLVE_BIND_TARGETS -- Use these to add your own custom bindings from the host to the container.

Say you want to map /tmp/garbage on your host to /tmp in the container. You also want to map /var/run/dbus/system_bus_socket from the host to the container. You can do this like this.

 RESOLVE_BIND_SOURCES=("/tmp" "/var/run/dbus/system_bus_socket")
 RESOLVE_BIND_TARGETS=("/tmp/garbage" "/var/run/dbus/system_bus_socket")

In this case, two additional --bind arguments will be automatically generated and included when you run Resolve.

Note that RESOLVE_BIND_SOURCES and RESOLVE_BIND_TARGETS can ONLY be used inside a resolve.rc file with RESOLVE_RC_PATH and will NOT work from the command line. This is due to an issue the bash shell has with passing arrays into scripts. So put it in a configuration file.

  • RESOLVE_RC_PATH -- A path to a configuration/auto-run script. See explanation below.

Making these configurations stick around

Use a resolve.rc file to set configurations and run any "pre-flight" commands

  • RESOLVE_RC_PATH -- using this single environment variable, you can direct ./resolve.sh and build.sh to run a configuration file, say resolve.rc, every time before starting Resolve. This is perfect for setting all the environment variables together in one place, which can be anywhere you want.

So just create a new file resolve.rc. It might look like this

 # resolve.rc
 # This will be run every time I run resolve.sh or build.sh!

 RESOLVE_LICENSES_AGREE="Y"
 RESOLVE_NETWORK="host"
 RESOLVE_ZIP=/home/myaccount/Downloads/DaVinci_Resolve_Studio_17.4.3_Linux.zip
 RESOLVE_BIND_SOURCES=("/tmp" "/var/run/dbus/system_bus_socket")
 RESOLVE_BIND_TARGETS=("/tmp/garbage" "/var/run/dbus/system_bus_socket")
 # add any other configurations or commands here
 
 echo "environment variables are set!"

(A security note-- this file will be sourced, that is, run from ./build.sh and resolve.sh, so be sure to limit access and privileges to this file appropriately.)

With all your configurations gathered together in one file, you now only need to set one environment variable, RESOLVE_RC_PATH, using any of the methods below:

At run time in the command itself

Environment variables can be set at the time you run the command, like:

 RESOLVE_TAG="MyTest" RESOLVE_ZIP=/home/myaccount/Downloads/DaVinci_Resolve_Studio_17.4.3_Linux.zip RESOLVE_LICENSES_AGREE="YES" RESOLVE_MOUNTS_PATH="/mnt/myContainers/resolve" ./build.sh

or

 RESOLVE_ENABLE_HOST_SYSTEM_FONTS="yes" RESOLVE_TAG="MyTest RESOLVE_MOUNTS_PATH="/mnt/myContainers/resolve" ./resolve.sh

or if you use resolve.rc, simply do

 RESOLVE_RC_PATH=./resolve.rc ./resolve.sh

In your desktop shortcut file

Set environment variables such as RESOLVE_RC_PATH in your ~/.local/share/applications/resolve.desktop shortcut file so it is used every time you launch the app with a click. Just change this line:

 Exec=bash -c "cd $HOME/containers/resolve && ./resolve.sh"

to

 Exec=bash -c "cd $HOME/container/resolve && env RESOLVE_RC_PATH=$HOME/container/resolve/resolve.rc ./resolve.sh"

Hand-entered in a local shell environment

You can also set these in advance:

 export RESOLVE_ZIP=/tmp/DaVinci_Resolve_Studio_17.4.3_Linux.zip

Then when you ./build.sh the next time (at least in this shell), it will remember the RESOLVE_ZIP.

Set via .bashrc or .zshrc autorun files

As mentioned, you can make this more permanent by assigning these environment variable to your ~/.bashrc, ~/.zshrc, or whatever autoruns when you start a new shell.

What's next?

There's a console-based external scripting API, see also here, here, and here, which can automate DaVinci Resolve Studio. It has been contemplated, but not AFAIK really explored, how containerized, easily-deployable scripted DaVinci Resolve may be useful, especially for distributed rendering and such.

Apparently, the $300 Studio version is required for this, so someone with multiple licenses, perhaps, can explore further.

Thanks.

Hope this is helpful to someone. If so, and you want to give back, consider smashing that like button.. oh wait this is text. Okay, how about making a US tax-deductable donation to the Electronic Frontier Foundation?

Last thought-- buy this thing!

Based on my very limited experience using DaVinci Resolve, it is EXCELLENT and the community around it and the tutorials I found around, etc are top-notch. Shout out to Casey Faris, especially, on YouTube. So I do recommend if you enjoy using Resolve, purchase the full "Studio" version, which you can get with the Speed Editor thing. It really appears to be worth the $300 US. (And no, no one is paying me to say that.) Great job, DaVinci/Blackmagic Design!

Disclaimer

THIS CONTAINER-RELATED SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

DaVinci Resolve, DaVinci Resolve Studio, and Blackmagic Design as well as their owners, officers, employees, shareholders, etc. are not affiliated with and do not endorse this container-related software. DaVinci Resolve, DaVinci Resolve Studio, and the Blackmagic Sound Library are not distributed by the developers of this software and contain their own licenses which must be read and agreed to before they are used. Please respect their licenses!

resolve's People

Contributors

cowmix avatar dhelgerson avatar fat-tire avatar gordonjcp avatar hanziness avatar maximummaxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

resolve's Issues

bind source path does not exist: /pulse/native

Hi,

I am testing this on Linux Mint 20.3. When running ./resolve.sh, I get:

docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /pulse/native

resolve.sh contains:

--mount type=bind,source=${XDG_RUNTIME_DIR}/pulse/native,target=${XDG_RUNTIME_DIR}/pulse/native \

so I guess the XDG_RUNTIME_DIR variable is not filled in . How to fix this?

Cheers
BC

[RESOLVED!] Can't get LUT loaded

I tried the LUTS that I was using in desktop versin of 18.6.4. The version I am using now in docker is the same version. However, it cannot find LUT. I placed it in

resolve/mounts/resolve-home/.local/share/DaVinciResolve/.LUT
also in /.local/share/DaVinciResolve/Fusion/LUTs

However, even after restart it, it doesn't show the LUTs I added.

Thank you so much!

So happy I found this! It worked like a charm. Previously, I was using a deb file to install Davinci Resolve. I was able to use it for weeks. However, looks like I installed some packages that ruined the libraries which affected Davinci Resolve from starting. I tried replacing libpango libglib without luck. So I tried fat-tire. OMG, it was so smooth! Thanks a lto!

How to use resolve.rc file with desktop shortcut?

I've been trying a myriad of different syntaxes to add the environment variable
RESOLVE_RC_PATH=./resolve.rc
to the bash line in the desktop file and so far nothing is working.
(I need internet access to the container for use with a network library. )

Error: creating build container: copying system image from manifest list. Manjaro

There was a problem installing

is it possible to fix this?

Manjaro
Docker version 20.10.21
./build.sh
During this build process, Blackmagic Design Pty. Ltd.'s License
Agreement for DaVinci Resolve [Studio] (18.1) will be extracted from
the zip file and displayed. You must carefully read the License Agreement
and agree to its terms and conditions before using DaVinci Resolve.
Similarly, some versions of NVIDIA's drivers also require acceptance of
a license, which is available at nvidia.com. You must review any applicable
license and agree to its terms and conditions before using the NVIDIA driver.
Do you agree to the above [y/N] y
Building the resolve:18.1 image...
WARN[0000] Reading allowed ID mappings: reading subuid mappings for user "alexandr" and subgid mappings for group "alexandr": no subuid ranges found for user "alexandr" in /etc/subuid 
WARN[0000] Found no UID ranges set aside for user "alexandr" in /etc/subuid. 
WARN[0000] Found no GID ranges set aside for user "alexandr" in /etc/subgid. 
STEP 1/16: FROM quay.io/centos/centos:stream9
Trying to pull quay.io/centos/centos:stream9...
Getting image source signatures
Copying blob 4ac1d6819b77 done  
Error: creating build container: copying system image from manifest list: writing blob: adding layer with blob "sha256:4ac1d6819b77566d3cee3dc4172247601164e2d6059757fb371b76f8f1fa411f": processing tar file(potentially insufficient UIDs or GIDs available in user namespace (requested 0:12 for /var/spool/mail): Check /etc/subuid and /etc/subgid if configured locally and run podman-system-migrate: lchown /var/spool/mail: invalid argument): exit status 1
Build of resolve:18.1 is complete.  To run resolve, try:

./resolve.sh
./resolve.sh                                                                                                                         
non-network local connections being added to access control list
./resolve.sh: строка 39: podman: команда не найдена
The 'resolve' image wasn't found.  Build the Dockerfile first.

qt error messages

Hi,

on Linux Mint 20.3 launching Resolve results to this in the ResolveDebug.txt:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Seems a QT related error in Mint. Anyone any clue on how to fix it? ldd shows no missing libraries.

Cheers,

BC

Crashes on startup with DR 18

The splash screen appears and disappears almost instantly. Bisected issue to commit bba7db4 - "Force rendering on dedicated GPU", d881adb does not suffer from this.

Intel onboard graphics (not in use), GT1030 card in slot.

Add a BMD udev rule to the repo

Note to self-- we may need to add something similar to this for people to add to their host to give access to the usb/hidraw devices.

File should be called something like /etc/udev/rules.d/70-blackmagic-design.rules

# BlackMagic Design hardware udev rules
# Put in /etc/udev/rules.d/70-blackmagic-design.rules

# BMD hardware (such as Speed Editor)
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1edb", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1edb",MODE="0660", GROUP="plugdev"

# DaVinci Resolve Studio dongle
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0201", TAG+="uaccess"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="096e", ATTRS{idProduct}=="0201", MODE="0660", GROUP="plugdev"

Anyone want to test it? Works for me w/podman

Add the ability to change the base container image as a configuration option.

Active development of Centos 7 (the preferred distribution by BMD for Resolve) ended in 2020. This repo currently uses Centos 8 Stream as the base container image. It would be cool to be able to lean on other RedHat derivatives like Centos 9 Stream, RockyOS and AlmaLinux.

I have manually tested most of these alternative base images however it would be good to have this as a runtime configuration parameter.

A couple missing packages needed for Resolve 18.1

A quick note that for the just-released Resolve 18.1, the following packages are apparently now dependencies and required to be added to the Dockerfile installed packages:

apr apr-util libXinerama libxkbcommon libxkbcommon-x11 libXrandr xcb-util-image xcb-util-keysyms xcb-util-renderutil xcb-util-wm

I added these manually and it seems to be working okay. These specific packages were reported as required by the 18.1 installer:

Error: Missing or outdated system packages detected.

Please install the following missing packages:
    apr apr-util libXinerama libxkbcommon libxkbcommon-x11 
    libXrandr xcb-util-image xcb-util-keysyms 
    xcb-util-renderutil xcb-util-wm

So I added them, and the built completed without issue. I did not test to see whether they were ALL actually needed, I just blindly added them.

When running for the first time, I got a weird frozen splash screen, and had to go into the container where I saw these two processes:

QtWebEngineProc                                              
DaVinci_Resolve  

When I killed those two, suddenly DR started running, and I got this:

image

The libraries needed to be updated:
image

I decided to do a backup of the database first, just in case. You can do this by clicking on the "i" with the circle around it next to the database name.

image

log4cxx error under podman

When trying resolve image under podman I get the following error:

log4cxx: No appender could be found for logger (BtCommon).
log4cxx: Please initialize the log4cxx system properly.
Failed to create Application support Dirs

Under docker it works fine.

Trying it on Fedora 37.

Any ideas on how to solve this issue?

Resolve doesn't use machine-id for DRM

Hello,
I have run some extensive tests with DaVinci Resolve Studio and did a write up about it here and in a video essay: https://trafotin.com/v/davinci-resolve

I discovered by accident that Resolve requires a static MAC address in order to stay registered. Using a random MAC address will require you to re-register Resolve every time NetworkManager restarts or reconnects. There's probably a relationship with vendor OUIs so they can limit piracy, but not exactly sure. It's the only reliable reason why they require a static MAC.

As for machine-id, if you change your machine-id to something generic, it has no impact on Resolve at all.

Hope this helps.

Does not launch from ntfs-3g mounted partition

podman/docker on Ubuntu 22.04. Does look like perms issue:

bash-5.1$ touch /opt/resolve/logs/test.txt
touch: setting times of '/opt/resolve/logs/test.txt': Permission denied

Permissions seem fine:

...
drwxrwxr-x 1 resolve gary  152 Feb  4 15:06  logs
...

...so, I suspect it could be that the filesystem where my resolve folder is on the host could be the issue: ntfs-3g.

EDIT:

I moved everything to ~/resolve/, which is an ext4 filesystem, (after deleting what was in resolve/mounts/) and also tried Docker -- with success:

$ RESOLVE_RC_PATH=./resolve.rc ./resolve.sh
Running:   ./resolve.rc
./env-set.sh: line 11: ./resolve.rc: No such file or directory
non-network local connections being added to access control list
------------------------------------------------------------------------------
No "container-machine-id" file found for this container.
Creating new one derived from host machine-id (cd12b4c5318d4f3c87a8bdffc2deceda)...
This container's machine-id file can now be found at /home/gary/resolve/mounts/container-machine-id and may be replaced if needed.
The container's /etc/machine-id  : 63f5f8237a527730a494e8549b5d244d
The network driver setting is          : --network=none
Bind-mounted directories of interest   :
  CONTAINER (CentOS 8)                  -> HOST (Ubuntu)
  ----------------------------------------------------------------------------
  /home/resolve                         -> /home/gary/resolve/mounts/resolve-home
  /opt/resolve/logs                     -> /home/gary/resolve/mounts/logs
  /opt/resolve/configs                  -> /home/gary/resolve/mounts/configs
  /opt/resolve/easyDCP                  -> /home/gary/resolve/mounts/easyDCP
  /opt/resolve/.license                 -> /home/gary/resolve/mounts/license
  /opt/resolve/'Resolve Disk Database'  -> /home/gary/resolve/mounts/database
  /var/BlackmagicDesign/DaVinci Resolve -> /home/gary/resolve/mounts/BlackmagicDesign
  /opt/resolve/Media                    -> /home/gary/resolve/mounts/Media
ActCCMessage Already in Table: Code= c005, Mode= 13, Level=  1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= c006, Mode= 13, Level=  1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= c007, Mode= 13, Level=  1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= 2282, Mode=  0, Level=  0, CmdKey= 8, Option= 0
PnlMsgActionStringAdapter Already in Table: Code= 615e, Mode=  0, Level=  0, CmdKey= -1, Option= 0
log4cxx: No appender could be found for logger (BtCommon).
log4cxx: Please initialize the log4cxx system properly.
QSocketNotifier: Can only be used with threads started with QThread
18.1.2.0006 Linux/Clang x86_64
Main thread starts: BD7A16C0
0x7ff5bd7a16c0 | Undefined            | INFO  | 2023-02-04 15:40:46,426 | --------------------------------------------------------------------------------
0x7ff5bd7a16c0 | Undefined            | INFO  | 2023-02-04 15:40:46,426 | Loaded log config from /home/resolve/.local/share/DaVinciResolve/configs/log-conf.xml
0x7ff5bd7a16c0 | Undefined            | INFO  | 2023-02-04 15:40:46,426 | --------------------------------------------------------------------------------
FusionScript Server [471] Started
Host 'Fusion' [1] Added

Podman also works. This project is impressive.

EDIT2:

I switched the filesystem used for that partition from ntfs-3g (or auto, in Ubuntu's Disk manager) to ntfs3 and Resolve launches as expected.

$ uname -r
5.15.0-60-generic

Hoping that the new ntfs3 driver proves reliable as I still need to dual-boot Win10 occasionally.

(Manjaro) error during build: ./DaVinci_Resolve_17.4.6_Linux.run: no such file or directory

I'm trying to set the container up on Manjaro Linux (x86_64), but the build process cannot seem to execute the DaVinci Resolve AppImage file inside the container (while the same command executes properly on the host machine). The output of the last step:

STEP 10/11: RUN cd /tmp     && unzip *DaVinci_Resolve_Linux.zip     && ./*DaVinci_Resolve_*_Linux.run  --appimage-extract     && cd squashfs-root     && ./AppRun -i -a -y     && cat /tmp/squashfs-root/docs/License.txt     && rm -rf /tmp/*.run /tmp/squashfs-root /tmp/*.zip /tmp/*.pdf
Archive:  DaVinci_Resolve_Linux.zip
  inflating: DaVinci_Resolve_17.4.6_Linux.run  
  inflating: Linux_Installation_Instructions.pdf  
/bin/sh: line 1: ./DaVinci_Resolve_17.4.6_Linux.run: No such file or directory
error building at STEP "RUN cd /tmp     && unzip *DaVinci_Resolve_Linux.zip     && ./*DaVinci_Resolve_*_Linux.run  --appimage-extract     && cd squashfs-root     && ./AppRun -i -a -y     && cat /tmp/squashfs-root/docs/License.txt     && rm -rf /tmp/*.run /tmp/squashfs-root /tmp/*.zip /tmp/*.pdf": error while running runtime: exit status 127
Build of resolve:17.4.6 is complete.  To run resolve, try:

Here is what I've tried (none have worked so far):

  • chmod a+x on the AppImage file in the container
  • bash ./*DaVinci_Resolve_*_Linux.run --appimage-extract (as with the NVIDIA driver file - but strangely that one installs, this one doesn't run) - it then reports ./DaVinci_Resolve_17.4.6_Linux.run: cannot execute binary file.
  • pre-extract the AppImage file, chmod a+x and modify Dockerfile so instead of copying the zip into the container, the AppImage is copied inside
  • install fuse or fuse3 along with the dependencies (in hope that it will fix the AppImage run error)
  • use Docker instead of Podman (buildah) to build the container
  • sudo the build script
  • revert back from kernel 5.15 to 5.10 on the host
  • try the CentOS Stream 9 version on the pipewire brranch and the CentOS 8 version on the main branch (also tried with an AlmaLinux 9 base image).

I'm not sure what is missing on my end, but so far the error seems a bit cryptic to me and I can't seem to find much about how to get the container to execute the AppImage file. I'll report back here if I manage to fix the error. If anyone has suggestions, feel free to report them here. I'll also try to use another tool to extract the AppImage file's contents (as this is what the container build script is doing, too).

making nvidia drivers work

i am noob so please excuse

When installing some old nvidia drivers there needs to be --accept-license or is fails

like this

&& bash /tmp/NVIDIA-Linux-${ARCH}-${NVIDIA_VERSION}.run --no-kernel-module --no-kernel-module-source --run-nvidia-xconfig --no-backup --no-questions --accept-license --ui=none \

log4cxx error at launch

hi,

I have this when try to launch:

./resolve.sh
/home/pil/containers/resolve
PODMAN
/home/pil/containers/resolve
non-network local connections being added to access control list

The container's /etc/machine-id : f9e164346eb00127f7c72b8e4b951048
The network driver setting is : --network=none
Bind-mounted directories of interest :
CONTAINER (CentOS 8) -> HOST (Ubuntu)

/home/resolve -> /home/pil/containers/resolve/mounts/resolve-home
/opt/resolve/logs -> /home/pil/containers/resolve/mounts/logs
/opt/resolve/configs -> /home/pil/containers/resolve/mounts/configs
/opt/resolve/easyDCP -> /home/pil/containers/resolve/mounts/easyDCP
/opt/resolve/.license -> /home/pil/containers/resolve/mounts/license
/opt/resolve/'Resolve Disk Database' -> /home/pil/containers/resolve/mounts/database
/var/BlackmagicDesign/DaVinci Resolve -> /home/pil/containers/resolve/mounts/BlackmagicDesign
/opt/resolve/Media -> /home/pil/containers/resolve/mounts/Media
ActCCMessage Already in Table: Code= c005, Mode= 13, Level= 1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= c006, Mode= 13, Level= 1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= c007, Mode= 13, Level= 1, CmdKey= -1, Option= 0
ActCCMessage Already in Table: Code= 2282, Mode= 0, Level= 0, CmdKey= 8, Option= 0
PnlMsgActionStringAdapter Already in Table: Code= 615e, Mode= 0, Level= 0, CmdKey= -1, Option= 0
log4cxx: No appender could be found for logger (BtCommon).
log4cxx: Please initialize the log4cxx system properly.

./resolve.sh /bin/bash give me the prompt

I have ubuntu 22.04.

any idea ?

regards,

Podman and Docker both can not be installed at the same time.

Just a heads up that env-set.sh is confused if both Podman and Docker are installed (and accessible via your PATH).

The net effect is that the resolve.sh script will fail to execute Resolve (Studio).

There also should be an option to specify which container management system to utilize if more than one is installed on a host system.

I'll be creating a PR soon to fix this issue.

DVR 18.6: USD.plugin needs "libXt" library

I have found that libXt.so.6 is missing for the new DaVinci Resolve 18.6.
Is it possible to add package libXt-1.1.5-12.el8.x86_64.rpm to the dnf installation step? What are the general rules for contribution?

image

Also, it would be nice to append in the troubleshooting part a reference to the NVIDIA article about installing and tweaking their container toolkit. I mentioned it primarily because of the issue with NVML: Insufficient Permissions and SELinux

Thank you for a good project and descriptive readme. Best regards,
NM

[FIXED] Speed Editor won't update (after 18.0.2) but still works

18.0.2 told me there was a version update. I tried to update via:

sudo ./opt/resolve/DaVinci\ Control\ Panels\ Setup/DaVinci\ Control\ Panels\ Setup

It started to work..

image

But then didn't:

image

The log said:

DFU Upgrade: Getting device info.
DFU Upgrade: Waiting for initial arrival.
DFU Upgrade: Current boot mode  0
DFU Upgrade: Detaching....
DFU Upgrade: Update started.
DFU Upgrade: Payload download complete, waiting for OS arrival.
DFU Upgrade: Current boot mode  0
DFU Upgrade: Current boot mode  255
DFU Upgrade failure:  Failed to get DFU interface after download

Now when I run it and try to update I get the "Failed" dialog and this:

DFU Upgrade: Getting device info.
DFU Upgrade: Waiting for initial arrival.
DFU Upgrade: Current boot mode  255
DFU Upgrade failure:  Failed to get DFU interface before detach

The speed editor appears to still work, and I no longer get notices that there is an update. So did it update? I have no idea, but if anyone does, let me know.

(I don't have an other OS like Mac/Windows to see if there is an error w/them..)

amdgpu anyone?

Found this extensive opencl docker topic how to do opencl with amdgpu. However there are 'some' side notes considering AMD GPU support, the problem is a mix of diversity and deprecating driver support among different product lines over time. If you consider to include AMDGPU support for your container approach please continue reading. It will be a lot of IF/ELSE conditions but could be very usefull.

First we have the opensource kernel driver amdgpu which ships as the default driver in most of the linuxdistro's. This driver can be extended with MESA opensource OpenGL support, also ships in most linux distro's. Both are maintained and work great on new 5xxx 6xxx navi/big-navi to polaris RX-4xx/5xx and even the legacy GPU's GCN1-3 (HD7xxx-R9-3XX). The Mesa OpenGL performance outruns the closed source OpenGL drivers from AMD themself by huge margins and keeps improving for not only newer but also to the dated GPU's. In most distro's kernel there is also kfd besides amdgpu. This component is used to extend the free opensource kernel driver with compute capabilites closed&open source. However for some PRO graphic apps like Davinci Resolve it is required to use the closed AMDGPU Proprietary OpenGl version besides OpenCL!

This closed OpenGL driver is a first requirement since D.R. 16.1 to work with their AMD proprietary OpenCL stack (interop). Between DR 16.1 - 17, this interop proprietary OpenGL + OpenCL requirement could be worked-around, but since DR 17 it is really required! Good news is that the closed AMDGPU OpenGl driver can co-exist on the same system as with the already installed kernel AMDGPU driver and Mesa OpenGL driver and can be manually loaded/linked with SHELL Variables for specific programs.

Now the OpenCL stack on linux for AMDGPU comes offcourse again in many (forced) flavours, but it gets shipped/delivered with the same AMDGPU proprietary driver from the AMD website that also gives proprietary OpenGL.

*AMD Closed OpenCL ORCA/Legacy GCN1-4 less dated 2021 (usefull for D.R)
*AMD Closed OpenCL PAL Vega very dated 2020 (usefull for D.R)
*AMD ROCM opensource OpenCL (dated releases in the past worked for older GPUs, and newer releases might again for newer GPU's nothing in between...)
*AMD ROCR partly replaces PAL (usefull for D.R)
*Mesa Clover opensource OpenCl dated (not usefull for D.R)
*Mesa RustiCl opensource OpenCl new (not yet tested)

Around spring 2021s AMD deprecated pre-polaris GCN1-3 HD7xxx R9-3XX GPU's from the AMDGPU proprietary driver (all platforms Windows/Linux), and OpenCL support broke earlier... The good news is that newer cards (big)navi rdna1/2 still profit from a similar proprietary OpenGL rand OpenCL replacement / linking trick.

To summarize, this docker+amd Davinci Resolve support to be usefull is atleast 2 directions past/future. Detect distro/kernel version compatible with AMDGPU pro driver or add workaround for forcing the driver installing/extracting libs on other distro/kernel versions than officially supported. Than for AMDGPU's before Polaris like GCN1-3, HD7xxx R9-3XX, filter by device-id/name and download the dated older 21.20 21.30/40/50 although listed on AMD their own website broken for orca OpenCl AMDGPU proprietary driver, extract and only static link proprietary OpenGL with use of static linked Orca/legacy OpenCl for them. Not sure if they still work with newest 'amdgpu/kfd' kernel driver which comes with newer distro's still have to test. Than for newer polaris/vega/rdna1/2(big)navi download the latest and do the same identification but again with multiple directions, using OpenCl PAL or even RocM perhaps for Vega (removed since 20.40/45)?) than RoCR for anything after that like RDNA1/2?

This is offcourse a extreme simplification, but has worked in the past on seperate gpu's using different distro's. First thing to try is if I can get DR 17.x working in supported ubuntu 20.04 with 21.1030 OpenGL/OpenCL within Docker. Than try a newer D.R. 18x or maybe a newer Ubuntu and see if that works?

Nevermind the choices in AMD Vulkan landscape on linux ;-) ...

EDIT: Took the AMD proprietary driver versions suggested by Thomas Debesse.

Missing H.264/H.265 render options with nvidia card

Everything appears to be installed correctly. I installed the latest nvidia linux drivers on the Linux Mint 21 host before doing the installation instructions for fat-tire resolve. In Preferences in Resolve I see my Quadro T1000 card showing up with CUDA selected. But when I go to the render page I don't see h.264/5 options under Quicktime.
I had this same video card working with these options (on a previous OS build) when I installed Resolve 18 directly on Debian 11 with the makeresolvedeb script.

Any ideas why this isn't working?

Resolve fails to start after a previous system crash

When the system crash happened, I was using Davinci Resolve via fat-tire.

Now when I start it, I am now getting an error message. I don't know if it's fat-tire related or something broke in my system.
Here's the output when I start ./resolve.sh

non-network local connections being added to access control list
e611ac7fb2c1
e611ac7fb2c1
------------------------------------------------------------------------------
The container's /etc/machine-id  : f2af41ea76a20fe44741d4bb9945c1a4
The network driver setting is          : --network=none
Bind-mounted directories of interest   :
  CONTAINER (CentOS 8)                  -> HOST (Debian GNU/Linux)
  ----------------------------------------------------------------------------
  /home/resolve                         -> /home/rcamara/containers/resolve/mounts/resolve-home
  /opt/resolve/logs                     -> /home/rcamara/containers/resolve/mounts/logs
  /opt/resolve/configs                  -> /home/rcamara/containers/resolve/mounts/configs
  /opt/resolve/easyDCP                  -> /home/rcamara/containers/resolve/mounts/easyDCP
  /opt/resolve/.license                 -> /home/rcamara/containers/resolve/mounts/license
  /opt/resolve/'Resolve Disk Database'  -> /home/rcamara/containers/resolve/mounts/database
  /var/BlackmagicDesign/DaVinci Resolve -> /home/rcamara/containers/resolve/mounts/BlackmagicDesign
  /opt/resolve/Media                    -> /home/rcamara/containers/resolve/mounts/Media
docker: Error response from daemon: error gathering device information while adding custom device "/dev/nvidia-uvm": no such file or directory.

Manjaro: Check for missing paths before mounting in resolve.sh

For compatibility with Arch/Majaro, make the following two mounts conditional on the source actually existing.

    --mount type=bind,source=${HOME}/.local/share/fonts,target=/usr/share/fonts,readonly (no such directory on my Manjaro machines: ~/.local/share/fonts - possibly because I installed all fonts globally?)
    --mount type=bind,source=/etc/alternatives/x-cursor-theme,target=/usr/share/icons/default/index.theme,readonly (again, the folder /etc/alternatives/x-cursor-theme does not exist)

(See here for more on cursor theme locations in Arch. The ideal situation is to inherit the same mouse theme from the host, which works currently in Ubuntu, but a more universal solution may exist (?) Perhaps a fallback value might be ~/.icons/default/index.theme with a further fallback to /usr/share/icons/default/index.theme )

Thanks @Hanziness for IDing this as an issue.

[Fixed] DaVinci Resolve 18.5+ w/ Rocky Linux 8.6 support

DaVinci Resolve (DVR) 18.5+, beta announced today, will have official Rocky Linux support:

Rocky Linux 8.6 or CentOS 7.3.

DVR-in-a-containers have worked with Rocky/Alma/Centos 9 stream already, but it's not a bad idea to make sure the build works with this older 8.x version.

Here are some issues I found with the new beta, plus quick solutions for anyone experiencing a crash on ./build.shing.

After addressing these issues, Resolve started properly on Ubuntu 23.04 (beta) with pipewire. Hopefully soon we'll have a PR to get this all in. In fact, we might want to start making:

RESOLVE_BASE_CONTAINER_IMAGE=rockylinux:8.6

The default OS if version 18.5+ is being installed just to match up with what BlackMagic Design supports officially.

Issue: DVR 18.5 has new package dependencies:

libglvnd-opengl and pulseaudio-libs are reported missing.

Solution: Add these two packages to the Dockerfile.

NOTE: Tested on Centos 8.6 and Almalinux 9 and worked for both.

Issue: Rocky Linux 8.6 doesn't know anything about:

libxcrypt-compat and compat-openssl11 (which we're using w/pipewire on centus/alma/rocky 9)

Solution for Rocky 8.6:

Pull these two packages out of the Dockerfile when building for Rocky 8.x. For Rocky 8.x, you can install compat-openssl10 for the onboarding app to work.

(Confirmed it works without them for Ubuntu 23.04 w/pipewire.)

NOTE: Removing libxcrypt-compat breaks DVR 18.5b1 on Alma Linux 9, so will have to check if they should be added or not on the fly.

Issue: DaVinci_Resolve_Welcome breaks

In almalinux 9, needs these packages: nss (for libsmime3.so), libXcomposite (for libXcomposite.so.1), libXdamage (for libXdamage.so.1) and it still needs compat-openssl10 to address the QSslSocket: issues per issue #26. This hasn't been fixed due to the security implications of an older/deprecated OpenSSL.

As mentioned, Rocky 8.6 uses compat-openssl10 to make onboarding work, even though it's deprecated.

Issue: CRB repository missing in Centos 8.6 (x264 encoder only)

If BUILD_X264_ENCODER_PLUGIN is set, the --enablerepo=crb which works nicely in centos/alma/rocky 9 is missing from Rocky 8. This repo is needed to find nasm used for making the encoder plugin.

NOTE: This breaks Alma Linux 9 build, so will have to check which to use. If anyone more familiar with the centos distro knows how to do this correctly, please respond otherwise I'll have to wing it.

Solution for Rocky 8.6:

Replacing crb with powertools in the Dockerfile seems to fix this on Rocky 8.6. At least the build crash goes away and DVR still seems to work okay.

Issue: "ed" the simple patch/text editor not found (x264 encoder only)

Solution for Rocky 8.6:

ed needs to be added to the packages to be installed in the Dockerfile if the x264 encoder is being built.

NOTE: works with Alma Linux 9 build.


If you're just trying to get the new beta to work, doing the adjustments above should be a good workaround, depending on what your host is running and the preferred image (Alama/Rocky/Centos 9 vs. Rocky 8.6). The real trick will be to make this all work in the Dockerfile but not break installations on older hosts, older container images and older versions of DVR.

fuseoverlayfs

Hi,

there is an error in the install instructions:
it is:
apt install fuse-overlayfs
not:
apt install fuseoverlayfs

Cheers,

BC

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.