Skip to content
This repository was archived by the owner on Dec 2, 2024. It is now read-only.

Validate pipeline for aws20 container#4

Merged
becker33 merged 5 commits intomasterfrom
validate-rev-aws20
Apr 8, 2021
Merged

Validate pipeline for aws20 container#4
becker33 merged 5 commits intomasterfrom
validate-rev-aws20

Conversation

@scottwittenburg
Copy link
Collaborator

No description provided.

@scottwittenburg scottwittenburg requested a review from becker33 July 17, 2020 21:10
@scottwittenburg
Copy link
Collaborator Author

The regex-based branch automated build isn't working, and I'm wondering if it could be related to this issue.

@scottwittenburg
Copy link
Collaborator Author

The regex-based branch automated build isn't working, and I'm wondering if it could be related to this issue.

Although who knows, is it possible Docker Hub is waiting for this recently triggered gitlab check to finish? For some reason pushing the same sha to a different branch name (one that should match the autobuild rule) also re-triggered the gitlab pipeline, even though that new branch name is not associated with this PR.

Copy link
Member

@becker33 becker33 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple corrections on the compilers.

Comment on lines 17 to 21
g++-4.8 \
gcc \
gcc-4.8 \
gfortran \
gfortran-4.8 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need a gcc-6.5 in here. We need to have multiple system gccs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll add 6.5.0

spack install zlib %clang
spack install zlib @1.2.8
spack install zlib %gcc@4.8
spack install zlib %gcc@7.5.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be gcc@6.5.0. There's no gcc@7.5.0 on the system when the users log in, and this isn't a compiler that we bootstrap during the tutorial.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I picked gcc@7.5.0, because that's what is installed when the Dockerfile installs gcc, g++ and gfortran. But if I'm going to specifically install 6.5.0 too, then I can change the 4.8 in the test script to 6.5.0...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the whole point of this one is it's demonstrating changing the compiler version, so it needs to be different from the spec of the default gcc.

spack install tcl
spack install tcl ^zlib @1.2.8 %clang
spack install tcl ^/64mn
spack install tcl ^/64mn
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the most recent version of the tutorial this was /hmvj. It needs to be the hash of the zlib@1.2.8 cppflags=-O3 spec.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for the heads up, I'll see what the hash is now and set it to that.

@scottwittenburg
Copy link
Collaborator Author

@becker33 IIRC the targets -> all -> [x86_64] in this spack.yaml was needed for compiler bootstrapping to work correctly. This is resulting in the buildcaches all being designated that way. Does that mean we need a packages.yaml in the container specifying the same thing? Right now, commands that should install from the binary mirror aren't doing it, I think because of the architecture mismatch ('haswellis the detected arch, but binaries in the mirror arex86_64`).

@becker33
Copy link
Member

Yes, there should be a packages.yaml in /etc/spack/ with just that one constraint in it.

@becker33
Copy link
Member

We target the whole thing for x86_64 because we can't know what machine they'll run the container on. When the new aarch64 macs become popular we may have to create two versions of the container.

@hartzell
Copy link

I wish I'd seen this earlier. Just got someone set up to run the tutorial and ran into a few roadblocks. Summarized it to the mailing list, but adding it here for posterity:


Their docker image is missing the file command. Build your own
derivative image that includes it.

mkdir foo
cd foo
vi Dockerfile
docker build -t spack-tutorial-updated .

Here's a functional Dockerfile:

FROM spack/tutorial:latest

USER root

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        file \
    && \
    apt-get autoremove --purge && \
    apt-get clean

USER spack

WORKDIR /home/spack

CMD ["bash"]

Start the new container like so:

docker run -it --rm spack-tutorial-updated

After you start the container and work through the tutorial, you'll
need to adjust a few things.

  • After cloning the spack repository and cd-ing into it, you'll need
    to configure it to build for the same target that they used by
    adding this bit to etc/spack/packages.yaml:

    packages:
        all:
          target: [x86_64]
  • Instead of adding their S3 bucket as a mirror, use the mirror that
    has been copied into the image:

    spack mirror add local file:///mirror/build_cache/

    and then go ahead and add the key as specified.

  • When it first mentions installing zlib w/ gcc@6.5.0, you'll need to
    install gcc@6.5.0 and add it to the list of known compilers (it's
    quick, it'll install from the binary cache):

    spack install gcc@6.5.0
    spack compiler add $(spack location -i gcc@6.5.0)
    

@becker33 becker33 merged commit 22d9fc1 into master Apr 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants