-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
FROM ubuntu:24.04 | ||
|
||
RUN mkdir -p /src | ||
WORKDIR /src | ||
|
||
RUN apt-get -y clean && apt -y update && apt install -y apt-utils && apt -y upgrade && echo 1 | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive \ | ||
apt install -y --no-install-recommends \ | ||
build-essential \ | ||
gfortran \ | ||
wget \ | ||
git \ | ||
pkg-config \ | ||
libbz2-dev \ | ||
libgsl-dev \ | ||
libssl-dev \ | ||
libcfitsio-dev \ | ||
libcfitsio-bin \ | ||
# libhdf5 needed by h5py | ||
libhdf5-dev \ | ||
# needed by mpich \ | ||
python3.12 \ | ||
python3.12-dev \ | ||
python3-pip \ | ||
# python3-mpi4py \ | ||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# python = python3 | ||
RUN ln -s "$(which python3)" /usr/bin/python | ||
|
||
ARG mpich=4.1.1 | ||
ARG mpich_prefix=mpich-$mpich | ||
|
||
ENV FFLAGS="-fallow-argument-mismatch" \ | ||
FCFLAGS="-fallow-argument-mismatch" | ||
|
||
RUN wget --no-check-certificate -nv https://www.mpich.org/static/downloads/$mpich/$mpich_prefix.tar.gz \ | ||
&& tar xvzf $mpich_prefix.tar.gz \ | ||
&& cd $mpich_prefix \ | ||
&& ./configure \ | ||
&& make -j 4 \ | ||
&& make install \ | ||
&& make clean \ | ||
&& cd .. \ | ||
&& rm -rf $mpich_prefix | ||
|
||
RUN /sbin/ldconfig | ||
|
||
RUN for x in \ | ||
wheel \ | ||
setuptools \ | ||
pytest \ | ||
numpy \ | ||
scipy \ | ||
astropy \ | ||
healpy \ | ||
fitsio \ | ||
numba \ | ||
intel-cmplr-lib-rt \ | ||
mpi4py \ | ||
seaborn \ | ||
matplotlib \ | ||
ipython \ | ||
ipykernel \ | ||
h5py \ | ||
; do pip3 install --break-system-packages $x; done \ | ||
&& rm -Rf /root/.cache/pip \ | ||
&& echo 1 | ||
|
||
ENV DESIUTIL_VERSION 3.4.3 | ||
ENV DESIMODEL_VERSION 0.19.2 | ||
ENV DESITARGET_VERSION 2.8.0 | ||
ENV DESISPEC_VERSION 0.68.1 | ||
ENV SPECLITE_VERSION v0.20 | ||
ENV FASTSPECFIT_VERSION 3.1.0 | ||
|
||
RUN pip3 install --break-system-packages git+https://github.com/desihub/desiutil.git@${DESIUTIL_VERSION}#egg=desiutil | ||
RUN pip3 install --break-system-packages git+https://github.com/desihub/desimodel.git@${DESIMODEL_VERSION}#egg=desimodel | ||
RUN pip3 install --break-system-packages git+https://github.com/desihub/desitarget.git@${DESITARGET_VERSION}#egg=desitarget | ||
RUN pip3 install --break-system-packages git+https://github.com/desihub/desispec.git@${DESISPEC_VERSION}#egg=desispec | ||
RUN pip3 install --break-system-packages git+https://github.com/desihub/speclite.git@${SPECLITE_VERSION}#egg=speclite | ||
RUN pip3 install --break-system-packages git+https://github.com/desihub/fastspecfit.git@${FASTSPECFIT_VERSION}#egg=fastspecfit && echo 1 | ||
|
||
RUN mkdir /homedir && chmod 777 /homedir | ||
ENV HOME /homedir | ||
|
||
#ENV NUMBA_CACHE_DIR=/homedir/numba_cache | ||
#RUN chmod 777 /homedir/numba_cache | ||
|
||
# set prompt and default shell | ||
SHELL ["/bin/bash", "-c"] | ||
ENTRYPOINT ["/bin/bash", "-c"] | ||
CMD ["/bin/bash"] | ||
|
||
#RUN echo "export PS1='[container] \\u@\\h:\\w$ '" >> $HOME/.bashrc \ | ||
# # Create config files in $HOME | ||
# && python -c "import astropy" \ | ||
# && python -c "import matplotlib.font_manager as fm; f = fm.FontManager()" \ | ||
# && ipython -c "print('hello')" \ | ||
# && echo 1 | ||
|
||
LABEL Maintainer="John Moustakas [email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters