Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
IMAGINE
Commits
5c0e173d
Commit
5c0e173d
authored
Mar 06, 2017
by
Theo Steininger
Browse files
Updated Dockerfile
parent
ab51aa24
Changes
2
Hide whitespace changes
Inline
Side-by-side
docker/Dockerfile
View file @
5c0e173d
FROM
python:2.7-wheezy
FROM
ubuntu:latest
RUN
apt-get update
RUN
apt-get
install
-y
build-essential python python-pip python-dev git gfortran autoconf gsl-bin libgsl-dev wget unzip
RUN
pip
install
numpy scipy cython astropy ipython
RUN
mkdir
/home/Downloads
WORKDIR
/home/Downloads
...
...
@@ -12,7 +17,7 @@ WORKDIR ..
#FFTW
RUN
wget http://www.fftw.org/fftw-3.3.5.tar.gz
&&
tar
xzf fftw-3.3.5.tar.gz
WORKDIR
fftw-3.3.5
RUN
./configure
--enable-threads
--enable-shared
--prefix
=
/usr/local/
&&
make
&&
make
install
RUN
./configure
--enable-threads
--enable-openmp
--enable-shared
--prefix
=
/usr/local/
&&
make
&&
make
install
WORKDIR
..
#GSL
...
...
@@ -32,9 +37,13 @@ WORKDIR ..
ENV
HEALPIX_TARGET optimized_gcc
ENV
HEALPIX /home/Downloads/Healpix_3.31
#healpy
RUN
pip
install
healpy
#Hammurabi
RUN
wget http://downloads.sourceforge.net/project/hammurabicode/hammurabi_v3.01.tar.gz
&&
tar
xzf hammurabi_v3.01.tar.gz
WORKDIR
hammurabicode-code
RUN
wget https://sourceforge.net/code-snapshots/svn/h/ha/hammurabicode/code/hammurabicode-code-41-trunk.zip
RUN
unzip hammurabicode-code-41-trunk.zip
WORKDIR
hammurabicode-code-41-trunk
COPY
hammurabi_Makefile Makefile
RUN
[
-r
/root/.healpix/3_31_Linux/config
]
&&
.
/root/.healpix/3_31_Linux/config
&&
make hammurabi
&&
make clean
WORKDIR
..
...
...
@@ -46,7 +55,8 @@ RUN apt-get update && apt-get install -y libblas3 libblas-dev \
cmake
\
build-essential
\
git
\
gfortran
gfortran
\
python-tk
#RUN apt-get install -y libopenmpi-dev openmpi-bin openmpi-doc
RUN
pip
install
numpy scipy matplotlib progressbar ipython
...
...
@@ -60,11 +70,26 @@ WORKDIR PyMultiNest
RUN
python setup.py
install
WORKDIR
..
#mpi4py
RUN
apt-get
install
-y
libopenmpi-dev openmpi-bin openmpi-doc
RUN
pip
install
mpi4py
RUN
pip
install
mpi4py
#hdf5
RUN
apt-get
install
-y
libhdf5-10 libhdf5-dev libhdf5-openmpi-10 libhdf5-openmpi-dev hdf5-tools
#h5py
RUN
wget https://api.github.com/repos/h5py/h5py/tags
-O
- |
grep
tarball_url |
grep
-v
rc |
head
-n
1 |
cut
-d
'"'
-f
4 | wget
-i
-
-O
h5py.tar.gz
RUN
mkdir
h5py
RUN
tar
xzf h5py.tar.gz
-C
h5py
--strip-components
=
1
WORKDIR
h5py
ENV
CC=mpicc
ENV
HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
RUN
python setup.py configure
--mpi
RUN
python setup.py build
RUN
python setup.py
install
WORKDIR
..
RUN
pip
install
cython healpy
#NIFTy
RUN
git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git
-b
master
WORKDIR
NIFTy
RUN
python setup.py
install
...
...
docker/hammurabi_Makefile
View file @
5c0e173d
...
...
@@ -34,7 +34,7 @@ CFITSIO = /usr/local
#
GALPROP = $(BASE_DIR)/galprop/galprop/build
CCFITS = $(BASE_DIR)/ccfits/CCfits//build/
CLHEP = $(BASE_DIR)/clhep/
2.0.4.5/CLHEP
/build/
CLHEP = $(BASE_DIR)/clhep/
clhep
/build/
#
# What c++ compiler you are using?
...
...
@@ -42,7 +42,7 @@ CLHEP = $(BASE_DIR)/clhep/2.0.4.5/CLHEP/build/
CXX = g++
#
# On OSX, maybe
#CXX = g++-mp-
4.3
#CXX = g++-mp-
5
#
# Compile options? 64bit system (-m64), optimization (-O2), openMP (-fopenmp), warnings (-Wall), etc.
...
...
@@ -58,7 +58,7 @@ CXXFLAGS = -m64 -O2 -fopenmp -Wall
FC = gfortran
#
# On OSX, maybe
#FC = gfortran-mp-
4.3
#FC = gfortran-mp-
5
# For gfortran
FCFLAGS = -O2 -ffixed-form -ffixed-line-length-132 -c
...
...
@@ -77,9 +77,10 @@ LFORTFLAGS= -Df2cFortran
#
# Additional options depending on how you want to run:
#
# Use openMP ? (Even for hammurabi.debug, at link stage, need this if HEALPix compiled with it.)
LFLAGS_CUSTOM = -fopenmp
# Use openMP. Right now, this is mandatory. (Contact
# trjaffe@gmail.com for help compiling without if for some reason you
# need it.)
LFLAGS_CUSTOM = -fopenmp
#
# OSX with gfortran-mp-4.3
#LFLAGS_CUSTOM = -fopenmp -lgcc_s.1
...
...
@@ -125,10 +126,10 @@ hammurabi.debug : CXXFLAGS+= $(ALL_INC) -c -DGALDEF_PATH=\"./GALDEF\" -DFITSDATA
libhamprop.a: CXXFLAGS+= $(ALL_INC) -c -DGALDEF_PATH=\"./GALDEF\" -DFITSDATA_PATH=\"./FITS/\" -DDATA_PATH=\"./DATA\" -DLIBHAMPROP -DGALPROP -DNE2001
hammurabi: LFLAGS = $(ALL_L) -lhammurabi -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3 $(LFLAGS_CUSTOM)
hammurabi.ne2001: LFLAGS = $(ALL_L) -lhammurabi -lNE2001 -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3 -lgfortran $(LFLAGS_CUSTOM)
hammurabi.debug: LFLAGS = $(ALL_L) -lhammurabi -lNE2001 -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3 -lgfortran -lgalprop -lskymap -lCCfits -lCLHEP $(LFLAGS_CUSTOM)
hammurabi.galprop: LFLAGS = $(ALL_L) -lhammurabi -lNE2001 -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3 -lgfortran -lgalprop -lskymap -lCCfits -lCLHEP $(LFLAGS_CUSTOM)
hammurabi: LFLAGS = $(ALL_L) -lhammurabi -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3
-lfftw3_omp
$(LFLAGS_CUSTOM)
hammurabi.ne2001: LFLAGS = $(ALL_L) -lhammurabi -lNE2001 -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3
-lfftw3_omp
-lgfortran $(LFLAGS_CUSTOM)
hammurabi.debug: LFLAGS = $(ALL_L) -lhammurabi -lNE2001 -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3
-lfftw3_omp
-lgfortran -lgalprop -lskymap -lCCfits -lCLHEP $(LFLAGS_CUSTOM)
hammurabi.galprop: LFLAGS = $(ALL_L) -lhammurabi -lNE2001 -lhealpix_cxx -lcxxsupport -lc_utils -lfftpack -lcfitsio -lgsl -lgslcblas -lm -lfftw3
-lfftw3_omp
-lgfortran -lgalprop -lskymap -lCCfits -lCLHEP $(LFLAGS_CUSTOM)
...
...
@@ -173,7 +174,10 @@ hammurabi.galprop: $(HAMMURABI_OBJ) $(NE2001_OBJ) $(NE2001_DATA) libNE2001.a li
hammurabi.debug: $(HAMMURABI_OBJ) $(NE2001_DATA) libNE2001.a libhammurabi.a run hammurabi.o
$(CXX) -o run/hammurabi.debug hammurabi.o $(LFLAGS) $(LFORTFLAGS)
ifeq ($(OSTYPE),darwin)
install_name_tool -change "@rpath/libCLHEP-2.3.3.1.dylib" "$(CLHEP)/lib/libCLHEP-2.3.3.1.dylib" run/hammurabi.debug
endif
print_constants: print_constants.o
$(CXX) -o run/print_constants print_constants.o
...
...
@@ -186,7 +190,7 @@ libhammurabi.a: $(HAMMURABI_OBJ)
clean:
rm *a *.o
rm *
.
a *.o
test:
(cd unit_test; ./test.csh)
...
...
@@ -196,4 +200,8 @@ test_big:
tarfile:
tar cvzf hammurabi.tgz *cpp *h Makefile *.f README
tar cvzf hammurabi.tgz *cpp *h Makefile *.f README hampy
unittar:
tar cvzf hammurabi_unit_test.tgz unit_test/inputs unit_test/GALDEF unit_test/FITS unit_test/negrid_n400.bin unit_test/ref.mini unit_test/ref unit_test/ref.big
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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