How to install on Ubuntu

I found that CasparCG server is on the Debian tracker but I wasn’t able to install it with

sudo apt install casparcg-server

What am I missing?

https://tracker.debian.org/pkg/casparcg-server

it is only available in ubuntu19.04 and debian buster, both of which are not yet released

Here is what I have figured out so far.

  1. clone the repo and checkout the v.2.2 tag
  2. run tools/linux/build-in-docker
  3. run tools/linux/extract-deps-from-docker
  4. run tools/linux/extract-from-docker

This creates a folder called caspar-server with the run.sh file that is mentioned in the readme.

So far this is much easier than last time I attempted this but its still far from simple and I don’t have it running yet.

You don’t want to do step 3, that is a helper script for developers.
But then running run.sh should get caspar running. Is it failing on something?
If you need the scanner, that is not handled in this at all or any of the linux docs yet

When I ran it I discovered that I didn’t have the Nvidia drivers installed yet and I lost remote access to the box after installing them. Ill be on site tomorrow and Ill look into this further.

Is it possible to run Caspar inside of docker or is docker just for building?

Ah ok, so not a bug then :slight_smile:

This is something I played around with a little while ago. Not in the 2.2 branch, but it should be easily cherry-pickable https://github.com/CasparCG/server/commit/db398665e4d66347b4d39e81c3b69cdab1af0cc7
It needs working gpu drivers on the host, and if running with NVIDIA, relies on https://github.com/NVIDIA/nvidia-docker.
It isnt the simplest to get running (it was picky about config file line endings, and the config file needs to exist or docker gets very confused), but it should work. Let me know if you give it a try, it would be nice to hear how/if it works from someone else.

I hope it’s possible… IMNSHO adding docker to most things is simply an extra layer that has to be managed/maintained. And a machine that’s doing production graphics shouldn’t be doing other things that would need to be walled off from Caspar. (I’m happy to blame nVidia for their use, too.)

(NB- I don’t think much of docker.)

z!

Yeah, I’m not entirely sure about running caspar in docker yet. I am interested in trying as I have had some dependency problems trying to build on my laptop (ubuntu18.10) but with ubuntu18.04 in docker it is fine, and possibly similar problems when trying to run builds.
For CI I think its a good idea, as it means that we know it gets a clean environment every time and allows for building on a different OS to whatever the CI offers. I have done that locally when needing to build a copy of 2.1, as that wants ubuntu14.04, and I didnt want to create a virtual machine for a single compile.

But as for using docker with caspar in production, I’m not entirely sure currently. One nice thing about it is being able to quickly and easily change the running version in a couple of commands. That said, the same thing could probably be achieved there with snaps, chef, puppet etc.
The scanner can then also be run in its own docker container, and depending on the environment a caspar client could be run there too, or some other small tools.

In general docker isn’t very useful if you will only ever have one instance of the application. As soon as you have more than one docker simplifies things. If its a server application running on staging and production or CI or graphics 1 and 2 doesn’t really change anything. Docker gives you an easy way to consistency create and recreate the same environment. Each one will behave the same way. If you need to make a change its simple to rollout. Did that change cause a problem? No worries just roll it back. Need a 3rd box? Again no problem.

It should also make it easier for the community. If you are using the docker image we know that your environment is correct.

Dunno, never had much of a problem with creating/replicating environments if the install scripts aren’t broken. And I think the likelihood of running more that one instance of Caspar on a single machine is rather low. For multiple machines, I expect the installer to put the right things in the right places and make sure that all the dependencies are good.

Basically, I’d rather not have another layer of stuff to manage and get in the way. (This is one of the reasons I haven’t bothered with Caspar on linux, requiring me to install and use docker, something that AFAICT takes my time and gives me no benefit.)

Not that I have a strong opinion about it :sunglasses:.

z!
who’s really a bsd person, anyway (for 25+ years)

…or properly managed symlinks (or environment vars)…

Late,r

z!

Hi guys! has anyone managed to run the server from a docker container?

I saw some scripts there in the linux tools folder in the main branch, I plan try them but I’m just staring to learn docker… this will be also my first time using casparcg on linux tbh so i’m just reading and learning all I can before jumping into the rabbit hole…

My ideal goal and dream would be to run a server instance inside a container in an UBUNTU VM on GCE… is more an experiment than anything else at this time…

any tips? has any of you already done this?

I wrote the scripts in the repo which run the server in docker. So I can confirm that it does just work.
I have some warnings to consider, I haven’t run the server in docker for very long, I did this as a bit of an experiment and still need to put in some thought and testing to ensure it wont have some weird performance issues. Also, it was primarily so that I can easily run specific versions locally without having to manage directories full of versions.

But long term I too would like to be able to run caspar in docker. That would massively simplify deployment to multiple machines. I can’t comment on running inside a vm, that is not something I have tried to do yet.

I would not recommend running in docker in a production environment yet, not until more testing has been done of it. But please do give it a try if you are experimenting. It would be great to know how it works for others

1 Like