-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-AL9-MNXB11
88 lines (68 loc) · 3.08 KB
/
Dockerfile-AL9-MNXB11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM almalinux:9.4
# Add repos
## Adding epel for screen and xclock
RUN dnf -y install epel-release
## External repos
## VSCode
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc
RUN sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
# update repos db
RUN dnf -y update
# Installation
## Various deps
RUN dnf -y install vim man screen xclock xorg-x11-xauth xdg-utils tree gitk tig meld strace figlet
## Python dependencies - note the crb repo install for venv dependencies
RUN dnf -y --enablerepo=crb install python python3-pip python3-virtualenv
## Broken meld dependencies in Alma Linux
RUN dnf -y install python3-cairo python3-gobject
## Python dependencies used in some of the tutorial exercises to generate data
RUN dnf -y install python3-numpy
## Compiler tools
RUN dnf -y install clang clang-tools-extra llvm gdb lldb lld gold
## Deps for coding e.g. building root
RUN dnf -y install patch libuuid libuuid-devel
## Unix utilities
RUN dnf -y install findutils gawk grep
## Text editors
RUN dnf -y install code neovim emacs nano
## Deps for ROOT (see https://root.cern/install/dependencies/)
## Other deps upon request by students: fftw fftw3
RUN dnf -y install git make cmake gcc-c++ gcc binutils libX11-devel libXpm-devel libXft-devel libXext-devel python openssl-devel compat-openssl11 fftw
## Debug info
RUN dnf -y debuginfo-install glibc libgcc libstdc++
# Environment
## Dir for course specific material
ENV MNXB11_MNXB11DIR=/opt
## Dir for all downloads
ENV MNXB11_DOWNLOADS=${MNXB11_MNXB11DIR}/download
RUN mkdir ${MNXB11_DOWNLOADS}
## Dir for all sources, a subfolder for each source tree
ENV MNXB11_SOURCEDIR=${MNXB11_MNXB11DIR}/source
RUN mkdir $MNXB11_SOURCEDIR
## Dir for all builds, a subfolder for each build environment
ENV MNXB11_BUILDDIR=${MNXB11_MNXB11DIR}/build
RUN mkdir $MNXB11_BUILDDIR
## Dir for all binaries, a subfolder for each software
ENV MNXB11_APPS=${MNXB11_MNXB11DIR}/apps
RUN mkdir ${MNXB11_APPS}
## Dir for all scripts
ENV MNXB11_SCRIPTS=${MNXB11_MNXB11DIR}/scripts
RUN mkdir ${MNXB11_SCRIPTS}
## Do we need a custom LIBS folder?
## Customization of prompt for Apptainer
ENV APPTAINERENV_PS1='Apptainer \u@\h \w > '
# Binaries and scripts
## Place all precompiled software in a folder called "apps" in the folder where you
## run `docker build`. The following line will copy all of them in ${APPS}.
## Note: one app per folder, to keep consistency.
ADD apps $MNXB11_APPS
# Add all scripts in a scripts folder where this is ran
ADD scripts/* ${MNXB11_SCRIPTS}/
# Run bash as default app when launching the container
# Decided to remove this as it causes problems with native docker
#CMD ["/bin/bash"]
# Initialize env a la Einar, but without copying
# ENTRYPOINT does not resolve the variables, and suggested solutions I found are not usable.
# So better to hardcode the folder names here.
# Test if it works upon login after removing bash exec above - seems to work
ENTRYPOINT ["/opt/scripts/init.sh"]