root-project / root-docker

Docker recipes for ROOT
30 stars 33 forks source link

Update Ubuntu to 20.04 #11

Closed Sinclert closed 4 years ago

Sinclert commented 4 years ago

This PR aims to bump up the Ubuntu version to the recently released 20.04 LTS.

Changes

Packages changes:

  1. Remove libqt4-dev, given that it is an optional dependency. (no longer shipped).
  2. Add libfcgi-dev, libxxhash-dev and libzstd-dev, as CMake would complain otherwise.

Dockerfile changes

  1. Base image now pointing to ubuntu:20.04.
  2. Pin a specific version of root. Otherwise, you would run into master branch instability.

Compilation changes

  1. Disable Alien (-Dalien flag).
  2. Disable CUDA (-Dcuda and -Dtmva-gpu flags).
  3. Disable VectorGeom (-Dvecgeom flag).

ROOT forum reference followed.

Final comments

Docker build currently fails when compiling ROOT, at around 70%. The message is:

Error: open CFI at the end of file; missing .cfi_endproc directory c++: fatal error: Killed signal terminated program cc1plus

Sinclert commented 4 years ago

Update:

The docker build error commented on the PR description is due to the lack of memory. I just increased the Docker memory from 2GBs to 4GBs and it built the image correctly ✅

Sinclert commented 4 years ago

👋 Is anything missing on this PR? @amadio

amadio commented 4 years ago

Hi, sorry, no, I just need time to test and merge. Hopefully I can do that today.

xaratustrah commented 4 years ago

would it be possible to set up an auto-build on docker hub? many thanks.

Sinclert commented 4 years ago

I add myself to @xaratustrah petition.

The whole purpose of my PR is to have an "official" Ubuntu 20.04 ROOT image (hold by rootproject) publicly available.

If the Dockerfile change is going to be left, as, you know, just a Dockerfile change, it is not going to be useful to anyone.

amadio commented 4 years ago

Sure, I made some extra updates to the Ubuntu image. Please let me know if you need anything that's not there. Later today I will create the automated build in Docker Hub. Cheers,

amadio commented 4 years ago

@Sinclert @xaratustrah Looks like the resource limits do not allow to build ROOT using Docker Hub. I updated the repository by hand instead. When we have binaries for Ubuntu 20.04, we can try to download and unpack that instead. Or we may create the image using Jenkins. For now, please just try out the image and let me know if you find any problems with it. I named it rootproject/root-ubuntu since that already existed, and that allows us to keep the same repo name when moving to a new Ubuntu version as well. Cheers,

Sinclert commented 4 years ago

Will do 👍

Thanks @amadio .

xaratustrah commented 4 years ago

Thanks to @amadio for the follow up. I made a local build. It indeed took several hours to build resulting in a 1.51GB image on OSX, so it definitely does not fit to docker-hub's limits. But as you mentioned, it can be pushed manually, which IMHO can be done every other month or so.

As for the testing, I can not check everything, but things that I was interested in work well:

ROOT itself --> check PyROOT with python3 --> check TBrowser --> check Fit Panel inside TBrowser --> check

1.5GB for latest Ubuntu and latest ROOT is quite good. So I think we are ready to go. Repo name is also fine.

kgizdov commented 4 years ago

@amadio let me have a crack at it, seems like I could try and reduce the size of it further.

amadio commented 4 years ago

@kgizdov An easy thing is to add --no-install-recommends to the call to apt-get, which I forgot. Since I don't know what features people want in ROOT, reducing which optional features are enabled or not is a bit more tricky.

kgizdov commented 4 years ago

I am thinking of a different approach - minimizing the number of commands issued (this reduces the saved intermediate states) and also dropping as much -dev packages as possible and only keeping the runtime libs. We'll see if it has any effect.