-
Notifications
You must be signed in to change notification settings - Fork 63
/
Dockerfile.root5
96 lines (84 loc) · 3.38 KB
/
Dockerfile.root5
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
86
87
88
89
90
91
92
93
94
95
96
# Pull SL7 image by digest (immutable identifier)
FROM scientificlinux/sl@sha256:437d3402c454319a5443bb5a99844c8d6f454828c59dcfb2730f1bdff8f2f48c AS build-stage
WORKDIR /workdir
SHELL ["/bin/bash", "-c"]
ENV LC_ALL=en_US.UTF-8
# epel repo is for python pip only
RUN yum update -q -y \
&& yum install -y epel-release \
&& yum install -y \
binutils gcc gcc-c++ gcc-gfortran xorg-x11-proto-devel \
git bzip2 unzip file which make imake patch \
bison byacc flex flex-devel libcurl-devel \
perl perl-Data-Dumper perl-Env perl-Digest-MD5 \
lapack-static blas-static \
libX11-devel libXext-devel libXpm-devel openmotif-devel \
python python-pip \
environment-modules \
&& yum clean all
# Install extra python modules used by the STAR software
RUN pip install pyparsing
RUN mkdir -p star-spack \
&& curl -sL https://github.com/star-bnl/star-spack/archive/588a489e3441c61a28f61f666e7f0aa3095f217a.tar.gz | tar -xz --strip-components 1 -C star-spack \
&& curl -sL https://github.com/spack/spack/archive/010e5761d6631eae102d1eec87e5e74a0e16ed82.tar.gz | tar -xz --strip-components 1 -C star-spack/spack
RUN source star-spack/setup.sh \
&& spack env create star-env-root5 star-spack/environments/star-x86_64-root-5.34.38-container.yaml \
&& spack env activate star-env-root5 \
&& spack install -j 5 --fail-fast \
&& spack gc -y
# Install CERNLIB
RUN mkdir /cern && cd /cern \
&& curl -sL https://github.com/psilib/cernlib/archive/centos7.tar.gz | tar -xz --strip-components 1 \
&& ./build_cernlib.sh \
&& cd /cern/2006/lib \
&& ln -s /usr/lib64/libblas.a libblas.a \
&& ln -s /usr/lib64/liblapack.a liblapack3.a \
&& cd /cern \
&& ln -s 2006 pro \
&& rm -fr /cern/2006/src /cern/2006/build /tmp/*
ENV STAR=/star-sw
ENV USE_64BITS=1
ENV CERN=/cern
ENV CERN_LEVEL=pro
ENV CERN_ROOT=$CERN/$CERN_LEVEL
ENV OPTSTAR=/opt/view
ENV STAR_HOST_SYS=sl88_gcc789
ENV NODEBUG=yes
ENV STAR_LIB=$STAR/.${STAR_HOST_SYS}/LIB
ENV STAR_BIN=$STAR/.${STAR_HOST_SYS}/BIN
ENV STAR_SYS=x8664_sl7
ENV PATH=$CERN_ROOT/bin:$STAR_BIN:$STAR/mgr:$PATH
ENV LD_LIBRARY_PATH=$STAR_LIB:$LD_LIBRARY_PATH
ENV LIBPATH+=:/lib64:/lib
# Dummy directories checked by cons
RUN mkdir $OPTSTAR/lib && mkdir $OPTSTAR/include
COPY . /star-sw
# XXX TEMP XXX: Don't force mysql static libraries to be linked into root4star
RUN cd /star-sw \
&& cat > root4star_cons.patch <<<$'\
diff --git a/asps/rexe/Conscript b/asps/rexe/Conscript \n\
--- a/asps/rexe/Conscript \n\
+++ b/asps/rexe/Conscript \n\
@@ -79,9 +79,7 @@ \n\
} \n\
$LIBS .= " -lgeant321 -lgcalor"; \n\
$LIBS .= " " . $env->{CERNLIBS};\n\
-$LIBS .= $env->{LDALL};\n\
$LIBS .= " " . $env->{Packages}->{MYSQL}->{LIBS};\n\
-$LIBS .= $env->{LDNONE};\n\
$LIBS .= " " . $FLIBS . " " . $env->{CLIBS};# " " . $env->{SYSLIBS} ;\n\
if ($STAR_SYS =~ /^sun4x_5.$/) {\n\
if ($LIBPATH) { $LIBPATH .= $main::PATH_SEPARATOR; }\n' \
&& patch -p1 < root4star_cons.patch
RUN source star-spack/setup.sh && spack env activate star-env-root5 \
&& export MYSQL=`spack location --install-dir mysql` \
&& export LIBXML2_DIR=`spack location --install-dir libxml2` \
&& cd /usr/include && ln -s $MYSQL/include mysql \
&& cd /star-sw \
&& cons +StarVMC/Geometry \
&& cons %pams/sim/g2r %OnlTools \
%StarVMC/GeoTestMaker \
%StRoot/StarGenerator/Kinematics \
%StRoot/StEEmcPool %StRoot/StFgtPool %StRoot/StHighptPool \
%StRoot/StJetFinder \
%StRoot/StShadowMaker