Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
easybuild-docker
Easybuild Docker
Commits
f6ba304f
Commit
f6ba304f
authored
Jan 14, 2022
by
Sebastian Achilles
Browse files
add almalinux 8.5
parent
e4efb00f
Pipeline
#88317
passed with stages
in 9 minutes and 14 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
alma8-eb-base/Dockerfile
0 → 100644
View file @
f6ba304f
ARG
IMG_REGISTRY=docker.io
ARG
IMG_NAME=almalinux
ARG
IMG_TAG=8.5
# allow CI/CD to change all of the above
FROM
${IMG_REGISTRY}/${IMG_NAME}:${IMG_TAG}
# set default easybuild version
ARG
EB_VER=4.5.1
LABEL
easybuild_version=${EB_VER}
# install required packages (EPEL is required for Lmod)
# RUN yum update -y
RUN
yum
install
-y
epel-release
\
&&
yum
install
-y
'dnf-command(config-manager)'
\
&&
dnf config-manager
--set-enabled
powertools
\
&&
yum
install
-y
bzip2 file gcc-c++ git Lmod make openssl openssl-devel patch python3-pip unzip xz vim which rdma-core-devel diffutils findutils
# install EasBuild & archspec
RUN
pip3
install
easybuild
==
${
EB_VER
}
archspec
# add 'easybuild' user
RUN
useradd
-ms
/bin/bash easybuild
# create /scratch & /easybuild directories
RUN
mkdir
/scratch
&&
chown
easybuild:easybuild /scratch
\
&&
mkdir
/easybuild
&&
chown
easybuild:easybuild /easybuild
# disable output buffering in Python, so we see EasyBuild output as it progresses
ENV
PYTHONUNBUFFERED=TRUE
# Define the ENTRYPOINT for subsequent commands (CMD)
ENTRYPOINT
["/bin/bash", "-l", "-c"]
# SHELL defines which login shell will be used within RUN steps
SHELL
["/bin/bash", "-l", "-c"]
# By default the container will start a bash shell
CMD
["bash"]
# switch to 'easybuild' user
USER
easybuild
# install EasyBuild as a module (& clean up /scratch);
# need to specify EB_PYTHON to ensure python3 is used,
# since pip3 was used for installation and /usr/bin/python also exists
RUN
EB_PYTHON
=
/usr/bin/python3 eb
--install-latest-eb-release
--prefix
/scratch
--installpath
/easybuild
\
&&
rm
-rf
/scratch/
*
\
# load EasyBuild module through .bashrc startup script
&& echo 'ml use /easybuild/modules/all && ml EasyBuild/'${EB_VER} >> ~/.bashrc
# remove globally installed EasyBuild, we can use the module going forward
USER
root
RUN
pip3 uninstall
-y
easybuild easybuild-framework easybuild-easyblocks easybuild-easyconfigs
# switch to 'easybuild' user
USER
easybuild
# print info on Lmod & EasyBuild
RUN
ml
--version
\
&&
which
-a
eb
\
&&
eb
--version
\
&&
eb
--show-system-info
# make sure we start in /home/easybuild rather than / when shell in started in container
WORKDIR
/home/easybuild
alma8-eb-test/Dockerfile
0 → 100644
View file @
f6ba304f
ARG
IMG_REGISTRY=gitlab.version.fz-juelich.de:5555
ARG
IMG_ORG=easybuild-docker
ARG
IMG_REPO=easybuild-docker
ARG
IMG_NAME=alma8-eb-base
ARG
IMG_TAG=latest
# allow CI/CD to change all of the above
FROM
${IMG_REGISTRY}/${IMG_ORG}/${IMG_REPO}/${IMG_NAME}:${IMG_TAG}
# Allow chaining the user and group id during build time
ARG
USER_ID
ARG
GROUP_ID
# add EasyBuild-develop.eb
ADD
EasyBuild-develop.eb /home/easybuild/EasyBuild-develop.eb
USER
root
RUN
chown
-R
easybuild:easybuild /home/easybuild/EasyBuild-develop.eb
# install pep8, keyring, keyrings.alt, and GitPython
RUN
pip3
install
--upgrade
pip
&&
pip3
install
pep8 keyring keyrings.alt GitPython
# set default easybuild version
ARG
EB_VER=4.5.1
LABEL
easybuild_version=${EB_VER}
# switch to 'easybuild' user
USER
easybuild
# install latest EasyBuild dev as a module (& clean up /scratch);
# need to specify EB_PYTHON to ensure python3 is used,
# since pip3 was used for installation and /usr/bin/python also exists
RUN
EB_PYTHON
=
/usr/bin/python3 eb
--force-download
--try-software-version
$(
date
'+%Y%m%d'
)
EasyBuild-develop.eb
--prefix
/scratch
--installpath
/easybuild
\
&&
rm
-rf
/scratch/
*
\
# load EasyBuild module through .bashrc startup script
&& echo 'ml use /easybuild/modules/all && ml EasyBuild/'${EB_VER} >> ~/.bashrc
# print info on Lmod & EasyBuild
RUN
ml
--version
\
&&
which
-a
eb
\
&&
eb
--version
\
&&
eb
--show-system-info
# adjust user and group id accroding to arguments given by
# --build-arg USER_ID=$(id -u ${USER}) \
# --build-arg GROUP_ID=$(id -g ${USER})
USER
root
RUN if
[
${
USER_ID
:-
0
}
-ne
0
]
&&
[
${
GROUP_ID
:-
0
}
-ne
0
]
;
then
\
userdel
-f
easybuild
&&
\
if
getent group easybuild
;
then
groupdel easybuild
;
fi
&&
\
groupadd
-g
${
GROUP_ID
}
easybuild
&&
\
useradd
-l
-u
${
USER_ID
}
-g
easybuild easybuild
&&
\
install
-d
-m
0755
-o
easybuild
-g
easybuild /home/easybuild
&&
\
chown
--changes
--silent
--no-dereference
--recursive
\
--from
=
1000:1000
${
USER_ID
}
:
${
GROUP_ID
}
\
/home/easybuild
\
/scratch
\
/easybuild
\
;
fi
# switch to 'easybuild' user
USER
easybuild
# make sure we start in /home/easybuild rather than / when shell in started in container
WORKDIR
/home/easybuild
alma8-eb-test/EasyBuild-develop.eb
0 → 100644
View file @
f6ba304f
# to install, use: eb --force-download --try-software-version $(date '+%Y%m%d') EasyBuild-develop.eb
easyblock = 'EB_EasyBuildMeta'
name = 'EasyBuild'
version = '0.0.0'
versionsuffix = '-dev'
homepage = 'https://easybuilders.github.io/easybuild'
description = """EasyBuild is a software build and installation framework
written in Python that allows you to install software in a structured,
repeatable and robust way."""
toolchain = SYSTEM
sources = [
{
'source_urls': ['https://github.com/easybuilders/easybuild-framework/archive/'],
'download_filename': 'develop.tar.gz',
'filename': 'easybuild-framework-develop.tar.gz',
},
{
'source_urls': ['https://github.com/easybuilders/easybuild-easyblocks/archive/'],
'download_filename': 'develop.tar.gz',
'filename': 'easybuild-easyblocks-develop.tar.gz',
},
{
'source_urls': ['https://github.com/easybuilders/easybuild-easyconfigs/archive/'],
'download_filename': 'develop.tar.gz',
'filename': 'easybuild-easyconfigs-develop.tar.gz',
},
]
# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?)
# EasyBuild is a (set of) Python packages, so it depends on Python
# usually, we want to use the system Python, so no actual Python dependency is listed
allow_system_deps = [('Python', SYS_PYTHON_VERSION)]
local_pyshortver = '.'.join(SYS_PYTHON_VERSION.split('.')[:2])
sanity_check_paths = {
'files': ['bin/eb'],
'dirs': ['lib/python%s/site-packages' % local_pyshortver],
}
moduleclass = 'tools'
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment