Dear Loris,

On 18/02/2019 11:46, Loris Bennett wrote:
Hi,

I have written a hook which works find if I do, say,

   eb --hooks hooks/hpc_hooks.py OpenMPI-3.1.3-GCC-8.2.0-2.31.1.eb --robot 
--rebuild

I then tried to to add the path to the hooks file to my config like this:

   [basic]
   logtostdout = false

   [config]
   modules-tool: Lmod
   prefix=/trinity/shared/easybuild/
   hooks=~/hooks/hpc_hooks.py

You'll need to specify the full path here, without using ~ or environment variables like $HOME (since they won't be expanded).

So, something like:

hooks=/user/example/hooks/hpc_hooks.py



but this leads to the following

   eb --hooks hooks/hpc_hooks.py OpenMPI-3.1.3-GCC-8.2.0-2.31.1.eb --robot 
--rebuild --dry-run
   == temporary log file in case of crash /tmp/eb-VhgLws/easybuild-NUbTBs.log
   ERROR: Specified path for hooks implementation does not exist: 
hooks/hpc_hooks.py

How should I be specifying the path?


If you specify the location of the hooks via a configuration file, there's no need to do it on the command line too, so you can drop the "--hooks hooks/hpc_hooks.py" here.

I suspect it to work if you don't use ~ in the configuration file.

If not, inspect the output of --show-config, to make sure that i) the configuration file is being picked up, ii) the path is correct.


regards,

Kenneth

Reply via email to