DUNE-DAQ / pocket

A pocket DAQ infrastructure
7 stars 1 forks source link

`daq_application` and `spack` for dunedaq-v3.0.0 #27

Closed plasorak closed 2 years ago

plasorak commented 2 years ago

Some cleanup was done with https://github.com/DUNE-DAQ/pocket/pull/26, however, I can't get the spack area to build a correct daq_application image with the tools in https://github.com/DUNE-DAQ/pocket/tree/develop/images/daq_application/daq_area_cvmfs

plasorak commented 2 years ago

The basic, traditional, instructions for building the image are:

dingp commented 2 years ago

If I remember correctly, the container will do bind mounts of cvmfs from host. So I am not sure if building the image for daq_application is still needed. @alessandrothea Can you clarify, please?

dingp commented 2 years ago

The tools under images/daq_application needs several updates related to changes in dbt and the switch-over to spack.

In principle, you can do the following to prepare the daq_application image interactively

  1. docker pull dunedaq/c8-minimal:spack to get the latest image
  2. docker run -it -v /cvmfs:/cvmfs dunedaq/c8-minimal:spack
  3. Once inside the container, do the first three steps you did above under /dunedaq/run;
  4. Add the two scripts to /dunedaq/run, execute make_env_script.sh to generate daq_app_rte.sh;
  5. Exit the docker container, on host shell, use docker ps -a to find the container ID, do docker commit [CONTAINER_ID] [new_image_name] to create a new docker image.

The new image shall be used with --entrypoint /dunedaq/run/app-entrypoint.sh option to run daq_application.


I did the following inside the container started with docker run -it -v /cvmfs:/cvmfs dunedaq/c8-minimal:spack, and committed the change to the new image daq_aplicaiton_0517 on np04-srv-015.

   mkdir -p /dunedaq/run && cd /dunedaq/run
   export http_proxy=http://np04-web-proxy.cern.ch:3128
   export https_proxy=http://np04-web-proxy.cern.ch:3128
   source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh
   setup_dbt latest-spack
   dbt-create -n -c last_successful dev-spack
   cd dev-spack/
   dbt-workarea-env
   git clone https://github.com/DUNE-DAQ/restcmd sourcecode/restcmd
   dbt-build
   cd ../
   wget https://raw.githubusercontent.com/DUNE-DAQ/pocket/develop/images/daq_application/common/app-entrypoint.sh
   wget https://raw.githubusercontent.com/DUNE-DAQ/pocket/develop/images/daq_application/common/make_env_script.sh
   chmod +x *.sh
   ./make_env_script.sh