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

DMOD image build failures due to t-route #673

Closed
robertbartel opened this issue Jul 12, 2024 · 4 comments · Fixed by #674 · May be fixed by aaraney/DMOD#1
Closed

DMOD image build failures due to t-route #673

robertbartel opened this issue Jul 12, 2024 · 4 comments · Fixed by #674 · May be fixed by aaraney/DMOD#1
Labels
Blocks Another issue is blocked until this is resolved bug Something isn't working maas MaaS Workstream

Comments

@robertbartel
Copy link
Contributor

robertbartel commented Jul 12, 2024

Currently it is not possible to build the DMOD ngen worker image. One of two different failures will occur, depending on whether the environment configuration is set to build the image with or without t-route.

UPDATE: the second failure has now been moved to its own issue: #676.

With t-route included by the image (which is the default), the following error is seen in the rocky_build_troute image build stage:

...
70.99 removing build/bdist.linux-x86_64/wheel
71.01 Successfully built troute_config-0.0.3.tar.gz and troute.config-0.0.3-py3-none-any.whl
71.04 python3: can't open file '/ngen/t-route/src/troute-nwm/setup.py': [Errno 2] No such file or directory
------
failed to solve: process "/bin/sh -c if [ \"${NGEN_WITH_ROUTING}\" == \"ON\" ]; then       export FC=gfortran ;       export F90=gfortran ;       mkdir ${WORKDIR}/t-route/wheels       && cd ${WORKDIR}/t-route       && ./compiler.sh       && cd ${WORKDIR}/t-route/src/troute-network       && python3 setup.py --use-cython bdist_wheel       && cp dist/*.whl ${WORKDIR}/t-route/wheels/       && cd ${WORKDIR}/t-route/src/troute-routing       && python3 setup.py --use-cython bdist_wheel       && cp dist/*.whl ${WORKDIR}/t-route/wheels/       && cd ${WORKDIR}/t-route/src/troute-config       && python3 -m build .       && cp dist/*.whl ${WORKDIR}/t-route/wheels/       && cd ${WORKDIR}/t-route/src/troute-nwm       && python3 setup.py bdist_wheel       && cp dist/*.whl ${WORKDIR}/t-route/wheels/ ;     fi" did not complete successfully: exit code: 2
Error: requested 'build' action failed (17); exiting without proceeding further

This is likely due to recent changes in t-route, though confirmation is still needed.

@robertbartel robertbartel added bug Something isn't working maas MaaS Workstream Blocks Another issue is blocked until this is resolved labels Jul 12, 2024
@robertbartel
Copy link
Contributor Author

@aaraney, I don't suppose you can tell quickly from this exactly what needs to be adjusted in the image's t-route build stage, can you?

@aaraney
Copy link
Member

aaraney commented Jul 12, 2024

Yep, this line is the issue. I simplified some of the build process for t-route in NOAA-OWP/t-route#784. As a result, troute.nwm no longer has a setup.py.

@aaraney
Copy link
Member

aaraney commented Jul 12, 2024

So instead we can just build with:

      && cd ${WORKDIR}/t-route/src/troute-nwm \
      && python3 -m build . \
      && cp dist/*.whl ${WORKDIR}/t-route/wheels/ ; \
    fi

@aaraney
Copy link
Member

aaraney commented Jul 12, 2024

@robertbartel, just opened #674. That should fix it. The easiest way to test that locally might be to just pull down the patch file. I learned recently that you can download a patch from github by just tacking on .patch to the end of a PR url. So, https://github.com/NOAA-OWP/DMOD/pull/674.patch for example. I thought it was kind of neat at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocks Another issue is blocked until this is resolved bug Something isn't working maas MaaS Workstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants