Skip to content
Snippets Groups Projects

write healpy_config file in Dockerfile

Open Jiaxin Wang requested to merge jxw into master
20 files
+ 407
467
Compare changes
  • Side-by-side
  • Inline
Files
20
+ 26
38
FROM ubuntu:latest
FROM ubuntu:latest
RUN apt-get update
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
#need python-tk???
RUN apt-get install -y build-essential python python-pip python-dev git gfortran autoconf gsl-bin libgsl-dev wget unzip vim cmake
RUN pip install numpy scipy cython astropy ipython==5.3.0
RUN pip install numpy scipy cython astropy ipython==5.3.0
RUN mkdir /home/Downloads
RUN mkdir /home/Downloads
@@ -15,25 +15,23 @@ RUN ./configure --prefix=/usr/local/ && make && make install
@@ -15,25 +15,23 @@ RUN ./configure --prefix=/usr/local/ && make && make install
WORKDIR ..
WORKDIR ..
#FFTW
#FFTW
RUN wget http://www.fftw.org/fftw-3.3.5.tar.gz && tar xzf fftw-3.3.5.tar.gz
RUN wget http://www.fftw.org/fftw-3.3.8.tar.gz && tar xzf fftw-3.3.8.tar.gz
WORKDIR fftw-3.3.5
WORKDIR fftw-3.3.8
RUN ./configure --enable-threads --enable-openmp --enable-shared --prefix=/usr/local/ && make && make install
RUN ./configure --enable-threads --enable-openmp --enable-shared --prefix=/usr/local/ && make && make install
WORKDIR ..
WORKDIR ..
#GSL
RUN wget http://nl.mirror.babylon.network/gnu/gsl/gsl-2.3.tar.gz && tar xzf gsl-2.3.tar.gz
WORKDIR gsl-2.3
RUN ./configure --enable-shared --prefix=/usr/local/ && make && make install
WORKDIR ..
ENV LD_LIBRARY_PATH=/usr/local/lib
#HEALPIX
#HEALPIX
RUN wget http://downloads.sourceforge.net/project/healpix/Healpix_3.31/Healpix_3.31_2016Aug26.tar.gz && tar xzf Healpix_3.31_2016Aug26.tar.gz
RUN wget http://downloads.sourceforge.net/project/healpix/Healpix_3.31/Healpix_3.31_2016Aug26.tar.gz && tar xzf Healpix_3.31_2016Aug26.tar.gz
WORKDIR Healpix_3.31
WORKDIR Healpix_3.31
COPY healpy_config healpy_config
RUN echo '4\n\
RUN ./configure < healpy_config && make
/sur/local/bin\n\
 
/usr/local/include\n\
 
4\n\
 
y\n\
 
0\n'\
 
> hlpx_config
 
RUN ./configure -L < hlpx_config && make
WORKDIR ..
WORKDIR ..
#RUN [ -r /root/.healpix/3_31_Linux/config ] && . /root/.healpix/3_31_Linux/config
ENV HEALPIX_TARGET optimized_gcc
ENV HEALPIX_TARGET optimized_gcc
ENV HEALPIX /home/Downloads/Healpix_3.31
ENV HEALPIX /home/Downloads/Healpix_3.31
@@ -41,15 +39,7 @@ ENV HEALPIX /home/Downloads/Healpix_3.31
@@ -41,15 +39,7 @@ ENV HEALPIX /home/Downloads/Healpix_3.31
RUN pip install healpy
RUN pip install healpy
#(Py)MultiNest
#(Py)MultiNest
RUN apt-get update && apt-get install -y libblas3 libblas-dev \
RUN apt-get install -y libblas3 libblas-dev liblapack3 liblapack-dev libatlas-base-dev libatlas3-base
liblapack3 liblapack-dev \
libatlas3-base libatlas-dev \
cmake \
build-essential \
git \
gfortran\
python-tk
#RUN apt-get install -y libopenmpi-dev openmpi-bin openmpi-doc
RUN pip install numpy scipy matplotlib progressbar ipython==5.3.0
RUN pip install numpy scipy matplotlib progressbar ipython==5.3.0
RUN git clone https://github.com/JohannesBuchner/MultiNest.git
RUN git clone https://github.com/JohannesBuchner/MultiNest.git
@@ -67,27 +57,22 @@ RUN apt-get install -y libopenmpi-dev openmpi-bin openmpi-doc
@@ -67,27 +57,22 @@ RUN apt-get install -y libopenmpi-dev openmpi-bin openmpi-doc
RUN pip install mpi4py
RUN pip install mpi4py
#hdf5
#hdf5
RUN apt-get install -y libhdf5-10 libhdf5-dev libhdf5-openmpi-10 libhdf5-openmpi-dev hdf5-tools
RUN apt-get install -y libhdf5-100 libhdf5-dev libhdf5-openmpi-100 libhdf5-openmpi-dev hdf5-tools
#h5py
#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 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 mkdir h5py
RUN tar xzf h5py.tar.gz -C h5py --strip-components=1
RUN tar xzf h5py.tar.gz -C h5py --strip-components=1
WORKDIR h5py
WORKDIR h5py
ENV CC=mpicc
ENV CC=mpicc
ENV HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
ENV HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
RUN python setup.py configure --mpi
RUN python setup.py configure --mpi
RUN python setup.py build
RUN python setup.py build
RUN python setup.py install
RUN python setup.py install
WORKDIR ..
WORKDIR ..
#hampy
RUN pip install jupyter pandas
ARG CACHE_DATE=2017-10-31
#NIFTy
#NIFTy
RUN git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git -b master
RUN git clone https://gitlab.mpcdf.mpg.de/ift/NIFTy.git
WORKDIR NIFTy
WORKDIR NIFTy
RUN python setup.py install
RUN python setup.py install
WORKDIR ..
WORKDIR ..
@@ -95,12 +80,15 @@ WORKDIR ..
@@ -95,12 +80,15 @@ WORKDIR ..
#Hammurabi
#Hammurabi
RUN git clone https://bitbucket.org/hammurabicode/hamx
RUN git clone https://bitbucket.org/hammurabicode/hamx
WORKDIR hamx
WORKDIR hamx
RUN make -f install/Makefile
#RUN mkdir build && cd build && cmake .. && make install
ENV HAMMURABI=/home/Downloads/hamx/bin/hamx
#ENV HAMMURABI=/home/Downloads/hamx/bin/hamx
WORKDIR ..
WORKDIR ..
 
#for pyhamx
 
RUN pip install jupyter pandas matplotlib
 
#IMAGINE
#IMAGINE
RUN git clone https://gitlab.mpcdf.mpg.de/ift/IMAGINE.git -b master
RUN git clone https://gitlab.mpcdf.mpg.de/ift/IMAGINE.git -b jxw
WORKDIR IMAGINE
WORKDIR IMAGINE
RUN python setup.py install
RUN python setup.py install
WORKDIR ..
WORKDIR ..
Loading