|
35 | 35 | from easybuild.tools.containers.base import ContainerGenerator |
36 | 36 | from easybuild.tools.containers.utils import det_os_deps |
37 | 37 | from easybuild.tools.filetools import remove_dir |
| 38 | +from easybuild.tools.module_naming_scheme.easybuild_mns import EasyBuildMNS |
38 | 39 | from easybuild.tools.run import run_cmd |
39 | 40 |
|
40 | 41 |
|
|
61 | 62 |
|
62 | 63 | RUN set -x && \\ |
63 | 64 | . /usr/share/lmod/lmod/init/sh && \\ |
64 | | - eb %(eb_opts)s --installpath=/app/ --prefix=/scratch --tmpdir=/scratch/tmp |
| 65 | + eb --robot %(eb_opts)s --installpath=/app/ --prefix=/scratch --tmpdir=/scratch/tmp |
65 | 66 |
|
66 | | -RUN touch ${HOME}/.profile && \\ |
67 | | - echo '\\n# Added by easybuild docker packaging' >> ${HOME}/.profile && \\ |
68 | | - echo 'source /usr/share/lmod/lmod/init/bash' >> ${HOME}/.profile && \\ |
69 | | - echo 'module use %(init_modulepath)s' >> ${HOME}/.profile && \\ |
70 | | - echo 'module load %(mod_names)s' >> ${HOME}/.profile |
| 67 | +RUN touch ${HOME}/.bashrc && \\ |
| 68 | + echo '' >> ${HOME}/.bashrc && \\ |
| 69 | + echo '# Added by easybuild docker packaging' >> ${HOME}/.bashrc && \\ |
| 70 | + echo 'source /usr/share/lmod/lmod/init/bash' >> ${HOME}/.bashrc && \\ |
| 71 | + echo 'module use %(init_modulepath)s' >> ${HOME}/.bashrc && \\ |
| 72 | + echo 'module load %(mod_names)s' >> ${HOME}/.bashrc |
71 | 73 |
|
72 | 74 | CMD ["/bin/bash", "-l"] |
73 | 75 | """ |
74 | 76 |
|
75 | 77 | DOCKER_UBUNTU2004_INSTALL_DEPS = """\ |
76 | 78 | RUN apt-get update && \\ |
77 | | - apt-get install -y python3 python3-pip lmod curl wget git \\ |
78 | | - bzip2 gzip tar zip unzip xz-utils \\ |
| 79 | + DEBIAN_FRONTEND=noninteractive apt-get install -y python3 python3-pip lmod \\ |
| 80 | + curl wget git bzip2 gzip tar zip unzip xz-utils \\ |
79 | 81 | patch automake git debianutils \\ |
80 | 82 | g++ libdata-dump-perl libthread-queue-any-perl libssl-dev |
81 | 83 |
|
82 | 84 | RUN OS_DEPS='%(os_deps)s' && \\ |
83 | | - test -n "${OS_DEPS}" && \\ |
84 | 85 | for dep in ${OS_DEPS}; do apt-get -qq install ${dep} || true; done |
85 | 86 | """ |
86 | 87 |
|
87 | 88 | DOCKER_CENTOS7_INSTALL_DEPS = """\ |
88 | 89 | RUN yum install -y epel-release && \\ |
89 | 90 | yum install -y python3 python3-pip Lmod curl wget git \\ |
90 | 91 | bzip2 gzip tar zip unzip xz \\ |
91 | | - patch makefile git which \\ |
| 92 | + patch make git which \\ |
92 | 93 | gcc-c++ perl-Data-Dumper perl-Thread-Queue openssl-dev |
93 | 94 |
|
94 | 95 | RUN OS_DEPS='%(os_deps)s' && \\ |
@@ -131,9 +132,12 @@ def resolve_template_data(self): |
131 | 132 |
|
132 | 133 | ec = self.easyconfigs[-1]['ec'] |
133 | 134 |
|
134 | | - init_modulepath = os.path.join("/app/modules/all", *self.mns.det_init_modulepaths(ec)) |
| 135 | + # We are using the default MNS inside the container |
| 136 | + docker_mns = EasyBuildMNS() |
| 137 | + |
| 138 | + init_modulepath = os.path.join("/app/modules/all", *docker_mns.det_init_modulepaths(ec)) |
135 | 139 |
|
136 | | - mod_names = [e['ec'].full_mod_name for e in self.easyconfigs] |
| 140 | + mod_names = [docker_mns.det_full_module_name(e['ec']) for e in self.easyconfigs] |
137 | 141 |
|
138 | 142 | eb_opts = [os.path.basename(e['spec']) for e in self.easyconfigs] |
139 | 143 |
|
|
0 commit comments