Skip to content

Commit

Permalink
Added Container definition file with root
Browse files Browse the repository at this point in the history
  • Loading branch information
Derkula committed Sep 6, 2024
1 parent b90da55 commit 677f21f
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions env.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Bootstrap: docker
From: ubuntu:22.04

%labels
Author ben.loer@pnnl.gov, stefan.zatschler@utoronto.ca
RecipeVersion V05_20231223

%help
CDMS Analysis base/development image with ROOT installed at /usr/local
Includes timegan timed training feature version 0.1.8

%post
export DEBIAN_FRONTEND=noninteractive
export TZ=Etc/UTC

## required packages for ROOT, BOOST, etc.
apt-get update && \
apt-get install -y build-essential cmake git ssh wget curl rsync vim \
dpkg-dev g++ gcc binutils libx11-dev libxpm-dev \
libxft-dev libxext-dev libssl-dev \
python3-dev python3-pip python3-venv \
libopenblas-dev libboost-dev libboost-python-dev libboost-numpy-dev \
gfortran libglu1-mesa-dev libmysqlclient-dev libsqlite3-dev \
libfftw3-dev libcfitsio-dev libgraphviz-dev \
libavahi-compat-libdnssd-dev libldap2-dev libxml2-dev \
libpcre3-dev libftgl-dev libglew-dev \
libgsl-dev libxi-dev doxygen && \
apt-get clean


## required python packages
python3 -m pip install timegan


## ROOT install
ROOTVERSION=6.28.10
mkdir /buildroot
cd /buildroot

## build ROOT from scratch (default option)
curl https://root.cern/download/root_v${ROOTVERSION}.source.tar.gz | tar -xz
cmake root-${ROOTVERSION} -DCMAKE_INSTALL_PREFIX=/usr/local \
-Dfortran=ON \
-Dminuit2=ON \
-Dmysql=ON \
-Dsoversion=ON \
-Dsqlite=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j4 && make install

## use ROOT binary distribution (for testing)
#curl https://root.cern/download/root_v${ROOTVERSION}.Linux-ubuntu22-x86_64-gcc11.4.tar.gz | tar -xz
#rm -rf root/man
#cp -RT root/ /usr/local/

## make ROOT libraries appear in python path
echo "/usr/local/lib" > /usr/local/lib/python3.10/dist-packages/ROOT.pth

ldconfig
cd /
rm -rf /buildroot


%environment
export ROOTSYS=/usr/local
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

0 comments on commit 677f21f

Please sign in to comment.