Open Nollde opened 11 months ago
While you would normally want to use the 'local'
extra
python -m pip install --upgrade 'recast-atlas[local]'
for the local
backend option, I can reproduce your bug even with it. I think this is another case of https://github.com/yadage/yadage/issues/116 that is getting hit, as
recast run examples/rome --backend docker
runs without errors.
which means that some dependencies have a bug that needs to get fixed. This isn't getting caught properly in our CI at the moment, so this will probably take some debugging early next week.
Ah, @Nollde no this is actually a simple permissions issue and lack of documentation at the end of it, in addition to https://github.com/yadage/yadage/issues/116. I should have debugged better.
Okay, starting from scratch in a Python 3.11 environment as I can't claim that Python 3.12 will have support for all dependencies yet.
$ mkdir -p /tmp/debug && cd /tmp/debug
$ python -m venv recast-atlas-issue-118 && . recast-atlas-issue-118/bin/activate
(recast-atlas-issue-118) $ python -m pip install --upgrade pip setuptools wheel
(recast-atlas-issue-118) $ python -m pip install 'recast-atlas[local]' 'yadage<0.21.0' # c.f. https://github.com/yadage/yadage/issues/116
If we then run
recast run examples/rome --backend local --tag debug
the jobs will start but then crash. That's strange as we already saw that running with the docker
backend works fine. If we investiage the log files by checking out recast-debug/eventselection/_packtivity/eventselection.run.log
, we'll see that we get a permissions error
...
2023-11-04 01:14:50,653 | pack.eventselection. | INFO | b'/build2/atnight/localbuilds/nightlies/21.2/AnalysisBase/athena/PhysicsAnalysis/D3PDTools/EventLoop/Root/Driver.cxx:107:exception: could not create output directory /tmp/debug/recast-debug/eventselection/submitDir'
...
that seems strange until we remember that recast-atlas
currently assumes that you're root
for all operations and so if you're not then you're going to need to tell it that you want it to run the containers as root
. If you run
recast run examples/rome --backend docker --tag debug-helper
then we see that all the docker run
commands have -u root
added into them
$ grep "docker run" recast-debug-helper/eventselection/_packtivity/eventselection.step.log
docker run --rm -i --cidfile /tmp/debug/recast-debug-helper/eventselection/_packtivity/eventselection.cid -u root -v /tmp/debug/recast-debug-helper/eventselection:/tmp/debug/recast-debug-helper/eventselection:rw -v /tmp/debug/recast-debug-helper/init:/tmp/debug/recast-debug-helper/init:rw docker.io/reanahub/reana-demo-atlas-recast-eventselection:1.0 sh -c bash
2023-11-04 06:20:29,219 | pack.eventselection. | DEBUG | moving on from subprocess execution: docker run --rm -i --cidfile /tmp/debug/recast-debug-helper/eventselection/_packtivity/eventselection.cid -u root -v /tmp/debug/recast-debug-helper/eventselection:/tmp/debug/recast-debug-helper/eventselection:rw -v /tmp/debug/recast-debug-helper/init:/tmp/debug/recast-debug-helper/init:rw docker.io/reanahub/reana-demo-atlas-recast-eventselection:1.0 sh -c bash
2023-11-04 06:20:29,219 | pack.eventselection. | DEBUG | finally for docker run --rm -i --cidfile /tmp/debug/recast-debug-helper/eventselection/_packtivity/eventselection.cid -u root -v /tmp/debug/recast-debug-helper/eventselection:/tmp/debug/recast-debug-helper/eventselection:rw -v /tmp/debug/recast-debug-helper/init:/tmp/debug/recast-debug-helper/init:rw docker.io/reanahub/reana-demo-atlas-recast-eventselection:1.0 sh -c bash
as a result of this packtivity
environment setting getting set in the recast-atlas
Dockerfile
(this isn't documented well).
With that in mind we just need to do the same locally with our local
backend run
PACKTIVITY_DOCKER_CMD_MOD="-u root" recast run examples/rome --backend local --tag working
then things run as expected.
So:
local
backend requires the 'local'
extra and using it isn't documented well.packtivity
environmental options aren't documented well at all either.Hi @matthewfeickert , thanks for mentioning https://github.com/yadage/yadage/issues/116, I was not aware of this issue.
With yadage<0.21.0
I can indeed use the local
workflow.
The PACKTIVITY_DOCKER_CMD_MOD
is not needed in my case.
You can see this in a small example here:
If you are interested we could troubleshoot why you need the PACKTIVITY_DOCKER_CMD_MOD
and I don't.
But we do not necessarily need to do this and I am also happy to just leave things as they are.
Also if we troubleshoot this we should probably move the discussion to a new issue.
This issue is correctly "connected to" and "resolved with" https://github.com/yadage/yadage/issues/116.
If you are interested we could troubleshoot why you need the
PACKTIVITY_DOCKER_CMD_MOD
and I don't. But we do not necessarily need to do this and I am also happy to just leave things as they are.
That might be interesting, but I suspect that this would be related to id groups on our local machines. I'll open up an Issue though for the future as having as unified of an experience is beneficial in the long run. :+1:
Though the first order of priority when I get time to do recast development again is fixing https://github.com/yadage/yadage/issues/116 and then getting that tested with the REANA team.
Dear experts,
I just wanted to try one of the great recast examples with a local workflow. It appears that this is currently not possible out of the box.
The problem seems to be that
yadage
expects ametadir
to create aYadageSteering
object here. This metadir however is currently not set here.Please find a minimal example here:
Is this the expected behavior? Or am I missing something more fundamental?
Thank you for your comments!