GithubHelp home page GithubHelp logo

Comments (10)

samcmill avatar samcmill commented on July 18, 2024

What is your Singularity build command line?

from hpc-container-maker.

VI-gha avatar VI-gha commented on July 18, 2024

from hpc-container-maker.

VI-gha avatar VI-gha commented on July 18, 2024

I have tried something similar with the AOCC compiler (which is much smaller) and get the same type of error
This reproduces it (I just kept the bare minimum)

BootStrap: docker
From: ubuntu:18.04

%files
aocc-compiler-2.3.0.tar /var/tmp

%post
tar -xvf /var/tmp/aocc-compiler-2.3.0.tar -C /usr/local
cd /usr/local/aocc-compiler-2.3.0
bash install.sh

What is fundamentally wrong with that?

from hpc-container-maker.

samcmill avatar samcmill commented on July 18, 2024

What version of Singularity and OS are you using? I can't reproduce the issue with 3.5.3 on Linux (CentOS 7).

It might be apptainer/singularity#5514? That only impacts 3.6 and later on WSL. The workaround in that case is to use a directory that is not bind mounted from the host into the container, so please try hpccm --working-directory /other/path ...

from hpc-container-maker.

VI-gha avatar VI-gha commented on July 18, 2024

from hpc-container-maker.

VI-gha avatar VI-gha commented on July 18, 2024

from hpc-container-maker.

samcmill avatar samcmill commented on July 18, 2024

The --working-directory option changes the location inside the container to use as the working (staging) directory.

For example, if the recipe is:

Stage0 += baseimage(image='ubuntu:18.04')

Stage0 += intel_psxe(eula=True, license='license.lic', tarball='parallel_studio_xe_2020_update4_cluster_edition.tgz')

Then hpccm --recipe 341.py --format singularity --working-directory /opt outputs:

BootStrap: docker
From: ubuntu:18.04
%post
    . /.singularity.d/env/10-docker*.sh

# Intel Parallel Studio XE
%post
    apt-get update -y
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        build-essential \
        cpio
    rm -rf /var/lib/apt/lists/*
%files
    parallel_studio_xe_2020_update4_cluster_edition.tgz /opt/parallel_studio_xe_2020_update4_cluster_edition.tgz
%files
    license.lic /opt/license.lic
%post
    cd /
    mkdir -p /opt && tar -x -f /opt/parallel_studio_xe_2020_update4_cluster_edition.tgz -C /opt -z
    sed -i -e 's/^#\?\(COMPONENTS\)=.*/\1=DEFAULTS/g' \
        -e 's|^#\?\(PSET_INSTALL_DIR\)=.*|\1=/opt/intel|g' \
        -e 's/^#\?\(ACCEPT_EULA\)=.*/\1=accept/g' \
        -e 's/^#\?\(ACTIVATION_TYPE\)=.*/\1=license_file/g' \
        -e 's|^#\?\(ACTIVATION_LICENSE_FILE\)=.*|\1=/opt/license.lic|g' /opt/parallel_studio_xe_2020_update4_cluster_edition/silent.cfg
    cd /opt/parallel_studio_xe_2020_update4_cluster_edition && ./install.sh --silent=silent.cfg
    rm -rf /opt/parallel_studio_xe_2020_update4_cluster_edition.tgz /opt/parallel_studio_xe_2020_update4_cluster_edition
%post
    cd /
    echo "source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64" >> /etc/bash.bashrc

Note that the tarball is copied to /opt rather than /var/tmp.

This looks like a Singularity issue, not a HPCCM issue? Have you filed an issue at https://github.com/hpcng/singularity/issues?

from hpc-container-maker.

VI-gha avatar VI-gha commented on July 18, 2024

from hpc-container-maker.

VI-gha avatar VI-gha commented on July 18, 2024

@samcmill

Thanks again Scott, it worked when using --working-directory /opt
I guess that others will have the same problem: would it not be better if that was documented or if the intel_psxe building block was modified to use %setup+cp instead of %files?

%setup
    cp parallel_studio_xe_2020_update4_cluster_edition.tgz /var/tmp/parallel_studio_xe_2020_update4_cluster_edition.tgz
    cp license.lic /var/tmp/license.lic

from hpc-container-maker.

samcmill avatar samcmill commented on July 18, 2024

Thanks @VI-gha. I need to investigate the apparent Singularity changed %files behavior. The solution may be to use %setup, I'm not sure.

I'm going to close this issue and open a new one focused on the Singularity behavior change.

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.