Last active
June 14, 2021 11:53
-
-
Save redoules/2a53ed54903144005ee79eb1fa57ef5d to your computer and use it in GitHub Desktop.
dockerfile for EMSoft (work in progress...)
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
#FROM ubuntu:20.04 | |
FROM linuxserver/code-server:latest | |
#INSTALL CMAKE | |
ENV TZ=Europe/Paris | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
RUN apt-get update | |
RUN apt-get install -y gfortran g++ build-essential git libssl-dev wget libopenblas-dev ocl-icd-opencl-dev qtdeclarative5-dev libqt5svg5* openssh-server libhdf5-dev | |
RUN cd \root | |
RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz &&\ | |
tar -zxvf cmake-3.20.2.tar.gz &&\ | |
cd cmake-3.20.2 &&\ | |
./bootstrap &&\ | |
make &&\ | |
make install | |
# GIT | |
RUN cd \root &&\ | |
git clone https://github.com/EMsoft-org/EMsoftSuperbuild.git | |
RUN cd /root &&\ | |
git clone https://github.com/EMsoft-org/EMsoftData.git | |
RUN cd /root &&\ | |
git clone https://github.com/EMsoft-org/EMsoft.git | |
RUN cd /root &&\ | |
git clone https://github.com/EMsoft-org/SHTfile.git &&\ | |
git clone https://github.com/EMsoft-org/SHTdatabase | |
RUN cd /root &&\ | |
git clone https://github.com/Alexii-Ann/EMSphInx.git | |
RUN cd /root &&\ | |
git clone https://bitbucket.hdfgroup.org/scm/hdffv/hdf5.git | |
# INSTALL EMSOFTSUPERBUILD | |
RUN mkdir /root/EMsoft_SDK | |
#RUN cd \root &&\ | |
# mkdir ~/EMsoft_SDK/superbuild/ &&\ | |
# mkdir ~/EMsoft_SDK/superbuild/Qt5.12.4 &&\ | |
# mkdir ~/EMsoft_SDK/superbuild/Qt5.12.4/Download &&\ | |
# cd ~/EMsoft_SDK/superbuild/Qt5.12.4/Download &&\ | |
# wget -nv http://qt.mirror.constant.com/archive/qt/5.12/5.12.4/qt-opensource-linux-x64-5.12.4.run | |
RUN cd /root/EMsoftSuperbuild &&\ | |
mkdir Debug &&\ | |
cd Debug &&\ | |
cmake -DEMsoft_SDK=/root/EMsoft_SDK -DCMAKE_BUILD_TYPE=Debug ../ &&\ | |
#cmake -DEMsoft_SDK=/root/EMsoft_SDK -DINSTALL_QT5=ON -DCMAKE_BUILD_TYPE=Debug ../ &&\ | |
# make -j &&\ | |
cd ../ &&\ | |
mkdir Release &&\ | |
cd Release &&\ | |
# cmake -DEMsoft_SDK=/root/EMsoft_SDK -DINSTALL_QT5=ON -DCMAKE_BUILD_TYPE=Release ../ &&\ | |
cmake -DEMsoft_SDK=/root/EMsoft_SDK -DCMAKE_BUILD_TYPE=Release ../ | |
# make -j | |
RUN cd /root/EMsoftSuperbuild/Debug &&\ | |
make -j &&\ | |
cd ../Release &&\ | |
make -j | |
# INSTALL EMSOFT | |
RUN cd /root/EMsoft &&\ | |
mkdir Release &&\ | |
cd Release &&\ | |
cmake -DCMAKE_BUILD_TYPE=Release -DEMsoft_ENABLE_EMsoftWorkbench=OFF -DEMsoft_SDK=/root/EMsoft_SDK ../../EMsoft &&\ | |
#make -j &&\ | |
cd ../ &&\ | |
mkdir Debug &&\ | |
cd Debug &&\ | |
cmake -DCMAKE_BUILD_TYPE=Debug -DEMsoft_ENABLE_EMsoftWorkbench=OFF -DEMsoft_SDK=/root/EMsoft_SDK ../../EMsoft | |
#make -j | |
RUN cd /root/EMsoft/Debug &&\ | |
make -j &&\ | |
cd ../Release &&\ | |
make -j | |
# INSTALL EMSPHINX | |
RUN cd /root &&\ | |
wget http://fr.archive.ubuntu.com/ubuntu/pool/universe/h/hdf5/libhdf5-cpp-100_1.10.0-patch1+docs-4_amd64.deb &&\ | |
wget http://fr.archive.ubuntu.com/ubuntu/pool/universe/h/hdf5/libhdf5-100_1.10.0-patch1+docs-4_amd64.deb &&\ | |
dpkg -i *.deb | |
RUN rm -R /root/EMSphInx | |
RUN cd /root &&\ | |
git clone https://github.com/EMsoft-org/EMSphInx.git | |
RUN cd /root &&\ | |
mkdir EMSphInxBuild &&\ | |
cd EMSphInxBuild &&\ | |
# sed -i -e '107d' /root/EMSphInx/depends/HDF5.cmake &&\ | |
# sed -i -e '116d' /root/EMSphInx/depends/HDF5.cmake &&\ | |
cmake -DEMSPHINX_BUILD_HDF5=ON -DHDF5_ROOT="/root/EMsoft_SDK/hdf5-1.10.7-Release" ../EMSphInx | |
RUN cd /root &&\ | |
sed -i -e '70d' /root/EMSphInx/depends/FFTW.cmake &&\ | |
sed -i '70i set(FFTW_URL "ftp://ftp.fftw.org/pub/fftw/fftw-${FFTW_VER}.tar.gz")' /root/EMSphInx/depends/FFTW.cmake &&\ | |
sed -i -e '44d' /root/EMSphInx/depends/HDF5.cmake | |
RUN cd /root/EMSphInxBuild &&\ | |
make -j | |
RUN mkdir /var/run/sshd | |
#EXPOSE 22 | |
EXPOSE 8443 | |
CMD ["/usr/sbin/sshd", "-D"] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment