Giter Club home page Giter Club logo

Comments (9)

samcmill avatar samcmill commented on June 19, 2024

Tracing through the linked recipe script, I think I understand the issue. Here's a short reproducer:

compiler = llvm(upstream=True)
image = baseimage(image='ubuntu:20.04')

Stage0 += image
Stage0 += compiler

Running this recipe through hpccm --recipe ... pulls in the xenial repo. Note that the llvm building block is referenced before the baseimage primitive.

The logic to set the Linux distribution type and version is in baseimage. Since llvm is called prior, it's using the default Ubuntu 16.

In the reproducer, if you exchange the first two lines, you get the expected focal repo.

I recommend moving the call to the baseimage primitive (stages['main'] += hpccm.primitives.baseimage(image=base_image_tag(args)) to the top of the build_stages function so that the correct Linux distribution is set before calling any of the building blocks.

from hpc-container-maker.

acmnpv avatar acmnpv commented on June 19, 2024

Thanks for the tip, I'll see that we rework our script then!

from hpc-container-maker.

mabraham avatar mabraham commented on June 19, 2024

I did rework the GROMACS script, but Sam's advice broke a cross-stage dependency we have. I found nothing more attractive to do than making a dummy stage that adds hpccm.primitives.baseimage(image=base_image_tag(args)) before any of the others. See https://gitlab.com/gromacs/gromacs/-/merge_requests/1764/diffs#14c7f142b515dba43cbfed3d95fe0b785b000384_636_636

from hpc-container-maker.

acmnpv avatar acmnpv commented on June 19, 2024

There still seems to be an issue, even when using the correct order of includes. The script adds https://apt.llvm.org/focal llvm-toolchain-focal-8 Release to the package includes, but this repository doesn't exist.

from hpc-container-maker.

samcmill avatar samcmill commented on June 19, 2024

If I'm following GROMACS script properly, I think the distro LLVM and upstream LLVM cases need to be separated. You're setting llvm(upstream=True, version='8') which isn't valid for the upstream. Or you could do something like llvm(upstream=False if v == '8' else True, version=v).

An alternative to the dummy stage approach is to use the hpccm.config.set_linux_distro().

from hpc-container-maker.

mabraham avatar mabraham commented on June 19, 2024

Thanks, those were very helpful suggestions. We're trying them out at https://gitlab.com/gromacs/gromacs/-/merge_requests/1764/diffs#14c7f142b515dba43cbfed3d95fe0b785b000384

from hpc-container-maker.

mabraham avatar mabraham commented on June 19, 2024

I think logic like upstream=True if int(args.llvm) > 11 else False is needed to have the comparison working correctly as an int, not a string.

from hpc-container-maker.

samcmill avatar samcmill commented on June 19, 2024

Closing. Please reopen if the issue persists.

from hpc-container-maker.

mabraham avatar mabraham commented on June 19, 2024

We resolved our issue, thanks!

from hpc-container-maker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.