<commit_before># DOCKER-VERSION 1.0
FROM dit4c/dit4c-container-ipython
MAINTAINER <EMAIL>

ENV PETSC_VERSION 3.5.3

RUN fsudo yum install -y \
  mercurial \
  libxml2-devel libpng-devel \
  openmpi-devel hdf5-openmpi-static \
  hostname time \
  gdal-devel geos-devel proj-devel libxml2-devel libxslt-devel \
  mesa-libOSMesa-devel mesa-libGLU-devel libX11-devel


# Install PETSc
RUN cd /tmp && \
    wget -nv "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-$PETSC_VERSION.tar.gz" && \
    tar xzf petsc-lite-$PETSC_VERSION.tar.gz && \
    cd petsc-$PETSC_VERSION && \
    export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH && \
    ./configure --prefix=/usr/local/petsc --download-fblaslapack --with-mpi-dir=/usr/lib64/openmpi --with-pic=1 && \
    make all test && \
    make install && \
    cd /tmp && \
    rm -r petsc-$PETSC_VERSION

RUN hg clone -b newInterface https://bitbucket.org/underworldproject/underworld2 /opt/underworld



## Disabled until a more modern version of ffmpeg is supported by Underworld
#RUN rpm --import /etc/RPM-GPG-KEY.atrpms && \
#    rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-7-7.el7.x86_64.rpm && \
#    fsudo yum install -y ffmpeg-devel

# Compile Underworld & gLucifer
# Note: CFLAGS isn't required - it just squelches the enormous number of compile
# warnings which would otherwise clutter the build log.
RUN cd /opt/underworld/libUnderworld && \
    ./configure.py --help && \
    export PATH=$PATH:/usr/lib64/openmpi/bin && \
    export PETSC_ARCH=linux-gnu && \
    export PETSC_DIR=/usr/local/petsc && \
    export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH && \
    source /opt/python/bin/activate && \
    ./configure.py --cxx=/usr/lib64/openmpi/bin/mpicxx --cc=/usr/lib64/openmpi/bin/mpicc --mpi-lib-dir=/usr/lib64/openmpi/lib --mpi-inc-dir=/usr/include/openmpi-x86_64 && \
    ./scons.py && \
    (rm /opt/underworld/libUnderworld/build/bin/LavaVu || true)


COPY /etc /etc<commit_msg>swtched to new UW repo, github<commit_after># DOCKER-VERSION 1.0
FROM dit4c/dit4c-container-ipython
MAINTAINER <EMAIL>

ENV PETSC_VERSION 3.5.3

RUN fsudo yum install -y \
  libxml2-devel libpng-devel \
  openmpi-devel hdf5-openmpi-static \
  hostname time \
  gdal-devel geos-devel proj-devel libxml2-devel libxslt-devel \
  mesa-libOSMesa-devel mesa-libGLU-devel libX11-devel \
  swig


# Install PETSc
RUN cd /tmp && \
    wget -nv "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-$PETSC_VERSION.tar.gz" && \
    tar xzf petsc-lite-$PETSC_VERSION.tar.gz && \
    cd petsc-$PETSC_VERSION && \
    export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH && \
    ./configure --prefix=/usr/local/petsc --download-fblaslapack --with-mpi-dir=/usr/lib64/openmpi --with-pic=1 && \
    make all test && \
    make install && \
    cd /tmp && \
    rm -r petsc-$PETSC_VERSION

RUN git clone https://github.com/underworldcode/underworld2.git /opt/underworld



## Disabled until a more modern version of ffmpeg is supported by Underworld
#RUN rpm --import /etc/RPM-GPG-KEY.atrpms && \
#    rpm -Uvh http://dl.atrpms.net/all/atrpms-repo-7-7.el7.x86_64.rpm && \
#    fsudo yum install -y ffmpeg-devel

# Compile Underworld & gLucifer
# Note: CFLAGS isn't required - it just squelches the enormous number of compile
# warnings which would otherwise clutter the build log.
RUN cd /opt/underworld/libUnderworld && \
    ./configure.py --help && \
    export PATH=$PATH:/usr/lib64/openmpi/bin && \
    export PETSC_ARCH=linux-gnu && \
    export PETSC_DIR=/usr/local/petsc && \
    export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH && \
    source /opt/python/bin/activate && \
    ./configure.py --cxx=/usr/lib64/openmpi/bin/mpicxx --cc=/usr/lib64/openmpi/bin/mpicc --mpi-lib-dir=/usr/lib64/openmpi/lib --mpi-inc-dir=/usr/include/openmpi-x86_64 && \
    ./scons.py && \
    cd libUnderworldPy ; ./swigall.py ; cd ../ && \
    ./scons.py && \
    (rm /opt/underworld/libUnderworld/build/bin/LavaVu || true)


COPY /etc /etc
{'fraction_non_alphanumeric': 0.14672966923650832, 'fraction_numerical': 0.019398159661775678, 'mean_word_length': 2.9315738025415445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1711758', 'n_tokens_mistral': 1677, 'n_tokens_neox': 1514, 'n_words': 289}