Installing Allpix on a machine based on containers

Dear developers,

I’m trying to install Allpix2 using the dockerfiles on a machine from my university which is based on a system relying on containers/images. I did that already last year, then I did not use that machine for a while and I am now trying to update and re-install it.

For the Dockerfile-base, there was no problem. Then I moved to Dockerfile-deps, but I got the following error:

> Step 18/33 : RUN source scl_source enable devtoolset-8 &&     mkdir -p ${GEANT4DIR}/{src,build} &&     curl -o ${GEANT4DIR}/geant4.${GEANT4_VERSION}.tar.gz             http://geant4-data.web.cern.ch/geant4-data/releases/source/geant4.${GEANT4_VERSION}.tar.gz &&     tar zxf ${GEANT4DIR}/geant4.${GEANT4_VERSION}.tar.gz -C ${GEANT4DIR}/src &&     rm -f ${GEANT4DIR}/geant4.${GEANT4_VERSION}.tar.gz &&     cd ${GEANT4DIR}/build &&     cmake3 -DGEANT4_INSTALL_DATA=ON           -DOpenGL_GL_PREFERENCE=GLVND           -DGEANT4_USE_GDML=ON           -DGEANT4_USE_QT=ON           -DGEANT4_USE_XM=ON           -DGEANT4_USE_OPENGL_X11=ON           -DGEANT4_USE_SYSTEM_CLHEP=OFF           -DCMAKE_INSTALL_PREFIX=../           ../src/geant4.${GEANT4_VERSION} &&     make -j`grep -c processor /proc/cpuinfo` &&     make install &&     rm -rf ${GEANT4DIR}/{src,build}
 ---> Running in 50e474195b9a
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
tar (child): /opt/geant4/geant4.10.06.p02.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Removing intermediate container 50e474195b9a
The command '/bin/sh -c source scl_source enable devtoolset-8 &&     mkdir -p ${GEANT4DIR}/{src,build} &&     curl -o ${GEANT4DIR}/geant4.${GEANT4_VERSION}.tar.gz             http://geant4-data.web.cern.ch/geant4-data/releases/source/geant4.${GEANT4_VERSION}.tar.gz &&     tar zxf ${GEANT4DIR}/geant4.${GEANT4_VERSION}.tar.gz -C ${GEANT4DIR}/src &&     rm -f ${GEANT4DIR}/geant4.${GEANT4_VERSION}.tar.gz &&     cd ${GEANT4DIR}/build &&     cmake3 -DGEANT4_INSTALL_DATA=ON           -DOpenGL_GL_PREFERENCE=GLVND           -DGEANT4_USE_GDML=ON           -DGEANT4_USE_QT=ON           -DGEANT4_USE_XM=ON           -DGEANT4_USE_OPENGL_X11=ON           -DGEANT4_USE_SYSTEM_CLHEP=OFF           -DCMAKE_INSTALL_PREFIX=../           ../src/geant4.${GEANT4_VERSION} &&     make -j`grep -c processor /proc/cpuinfo` &&     make install &&     rm -rf ${GEANT4DIR}/{src,build}' returned a non-zero code: 2

Is this something you could solve? It seems that the required file (geant4.10.06.p02.tar.gz) is not downloaded.

Thank you and kind regards,
Lorenzo de Cilladi

Hi @ldecilla

are you sure you have access to the internet from that container? Because for me the URL works:

http://geant4-data.web.cern.ch/geant4-data/releases/source/geant4.10.06.p02.tar.gz

/Simon

Hi @simonspa,

mmm, I think so, since I can do, for instance, git pull in the repository, and I think some other downloads are performed in Dockerfile-base and in earlier steps of Dockerfile-deps, aren’t they?

Is there an alternative to curl that I can try?

Thanks a lot!
Best,

Lorenzo

Hi @ldecilla

there of course is wget what you could try…

/Simon

Hi @simonspa,

I did some more attempts on my local, and it still does not work. However, if I remove the Geant4 layer from the Dockerfile.deps and go directly to ROOT, then that works, so the problem is not the curl command.

Does this help? I’m not experienced enough with Docker to understand, I’ll keep investigating, but maybe this already tells something to you and suggests the solution…!

Thanks again for the support!
Lorenzo

Hi @simonspa,

is it for instance possible to build only the last part (Dockerfile) and accessing the previous parts from the cern GitLab registry? I tried to, and this is the output:

MBP-di-Lorenzo:docker lorenzodecilladi$ docker build -t gitlab.c3s.unito.it:5000/ldecilla/allpix-squared-new .

Sending build context to Docker daemon 168.1MB

Step 1/7 : FROM gitlab-registry.cern.ch/allpix-squared/allpix-squared/allpix-squared-deps:latest

Get https://gitlab-registry.cern.ch/v2/allpix-squared/allpix-squared/allpix-squared-deps/manifests/latest: unauthorized: HTTP Basic: Access denied

MBP-di-Lorenzo:docker lorenzodecilladi$

Thank you! Kind regards,
Lorenzo

Hi @ldecilla

the solution is simple, their webserver now mandates https. Just add the s to the curl URL and it will work like a charm.

/Simon

Hi @simonspa,

that works great, thanks!

Best,
Lorenzo