Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drunc compose profile fails to build on MacOS #209

Open
AdrianDAlessandro opened this issue Nov 6, 2024 · 1 comment · May be fixed by #225
Open

drunc compose profile fails to build on MacOS #209

AdrianDAlessandro opened this issue Nov 6, 2024 · 1 comment · May be fixed by #225
Assignees
Labels
bug Something isn't working

Comments

@AdrianDAlessandro
Copy link
Contributor

AdrianDAlessandro commented Nov 6, 2024

Following the Docker setup instructions in the README, I was able to get the drunc-lite profile working, but the drunc profile failed.

I believe this is an Apple Silicon-only issue because it mentions "rosetta" in the error message, which is the conversion tool for running x86 on ARM.

I can't tell where the error is because it's happening on a multi-line RUN command in the Dockerfile.

$ docker compose --profile drunc build
 => ERROR [drunc  4/14] RUN source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh &&         setup_dbt latest_v5 &&         dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9 &&         cd fddaq-v5.1.0-a9 &&  0.8s
------
 > [drunc  4/14] RUN source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh &&         setup_dbt latest_v5 &&         dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9 &&         cd fddaq-v5.1.0-a9 &&         source env.sh &&         dbt-build &&         dbt-workarea-env &&         pip install git+https://github.com/DUNE-DAQ/[email protected]:
0.267 Added /cvmfs/dunedaq.opensciencegrid.org/tools/dbt/v8.4.0/bin -> PATH
0.268 Added /cvmfs/dunedaq.opensciencegrid.org/tools/dbt/v8.4.0/scripts -> PATH
0.268 DBT setuptools loaded
0.777 ERROR: [Wed Nov 6 12:28:23 UTC 2024] [/cvmfs/dunedaq.opensciencegrid.org/tools/dbt/v8.4.0/scripts/dbt_setup_tools.py:82]: There was a problem running "/cvmfs/dunedaq.opensciencegrid.org/tools/dbt/v8.4.0/scripts/dbt-clone-pyvenv.sh /cvmfs/dunedaq.opensciencegrid.org/spack/releases/fddaq-v5.1.0-a9-1/.venv 2>&1" (return value 100); exiting...
0.777 Release "fddaq-v5.1.0-a9" requested; interpreting this as release "fddaq-v5.1.0-a9-1"
0.777 Setting up the Python subsystem.
0.777 ==> Error: SPACK_ROOT must point to spack's prefix when using rosetta
0.777 Run this with the correct prefix before sourcing setup-env.sh:
0.777     export SPACK_ROOT=</path/to/spack>
0.777 ERROR: [11/06/24 12:28:23] [dbt-setup-tools.sh:210]:  There was a problem source-ing Spack setup script "/cvmfs/dunedaq.opensciencegrid.org/spack/releases/fddaq-v5.1.0-a9-1/spack-0.20.0/share/spack/setup-env.sh" 
------
failed to solve: process "/bin/bash -c source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh &&         setup_dbt latest_v5 &&         dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9 &&         cd fddaq-v5.1.0-a9 &&         source env.sh &&         dbt-build &&         dbt-workarea-env &&         pip install git+https://github.com/DUNE-DAQ/[email protected]" did not complete successfully: exit code: 1
@AdrianDAlessandro AdrianDAlessandro added the bug Something isn't working label Nov 6, 2024
@AdrianDAlessandro
Copy link
Contributor Author

I tried isolating the multi-line RUN command in the Dockerfile into steps to see which one is causing the error. I think it's the dbt-create step that is causing the error.

This is a little convoluted because there must be some details about the way RUN and && \ work in Dockerfiles that I'm missing. But I got the same error as above with this in the Dockerfile:

RUN source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh && \
        setup_dbt latest_v5 && \
        dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9
RUN cd fddaq-v5.1.0-a9
RUN source env.sh
RUN dbt-build
RUN dbt-workarea-env
RUN pip install git+https://github.com/DUNE-DAQ/[email protected]

And then I got a different error with this in Dockerfile:

RUN source /cvmfs/dunedaq.opensciencegrid.org/setup_dunedaq.sh && \
        setup_dbt latest_v5
RUN dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9
RUN cd fddaq-v5.1.0-a9
RUN source env.sh
RUN dbt-build
RUN dbt-workarea-env
RUN pip install git+https://github.com/DUNE-DAQ/[email protected]

That error was:

 => ERROR [drunc  5/20] RUN dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9                                                                                                                                                           0.1s
------                                                                                                                                                                                                                                
 > [drunc  5/20] RUN dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9:
0.122 /bin/bash: line 1: dbt-create: command not found
------
failed to solve: process "/bin/bash -c dbt-create fddaq-v5.1.0-a9 fddaq-v5.1.0-a9" did not complete successfully: exit code: 127

Since the dbt-create line was run, it makes we think everything before it passed.

@AdrianDAlessandro AdrianDAlessandro self-assigned this Nov 11, 2024
@AdrianDAlessandro AdrianDAlessandro linked a pull request Nov 11, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant