anchor.diff:  ENV TEXLIVE_VERSION 2018
   
   RUN wget http://mirrors.rit.edu/CTAN/systems/texlive/Images/texlive$TEXLIVE_VERSION.iso \
  -	&& wget http://mirrors.rit.edu/CTAN/systems/texlive/Images/texlive$TEXLIVE_VERSION.iso.md5 \
  -	&& RESULT=$(md5sum -c texlive$TEXLIVE_VERSION.iso.md5) \
  -	&& echo ${RESULT} > ~/check-texlive-md5.txt \
  -	&& osirrox -indev ./texlive$TEXLIVE_VERSION.iso -extract / ./texlive_install \
  -	&& rm -f texlive$TEXLIVE_VERSION.iso \
  -	&& ./texlive_install/install-tl -profile ./texlive.profile \
  -	&& rm -rf texlive_install
  +    && wget http://mirrors.rit.edu/CTAN/systems/texlive/Images/texlive$TEXLIVE_VERSION.iso.md5 \
  +    && RESULT=$(md5sum -c texlive$TEXLIVE_VERSION.iso.md5) \
  +    && echo ${RESULT} > ~/check-texlive-md5.txt \
  +    && osirrox -indev ./texlive$TEXLIVE_VERSION.iso -extract / ./texlive_install \
  +    && rm -f texlive$TEXLIVE_VERSION.iso \
  +    && ./texlive_install/install-tl -profile ./texlive.profile \
  +    && rm -rf texlive_install
   
   # Uncomment lines below to update TeX Live to latest packages
   # Sets texlive update mirror
  
positive.code: ENV SYMPHONY_VER 5.6
  
  RUN git clone --depth=1 --branch=stable/$SYMPHONY_VER https://github.com/coin-or/SYMPHONY SYMPHONY-$SYMPHONY_VER \
  	&& cd SYMPHONY-$SYMPHONY_VER \
  	&& git clone --depth=1 --branch=stable/0.8 https://github.com/coin-or-tools/BuildTools/ \
  	&& chmod u+x ./BuildTools/get.dependencies.sh \
  	&& ./BuildTools/get.dependencies.sh fetch --no-third-party \
  	&& ./configure \
  	&& make -j"$(nproc --all)" \
  	&& make -j"$(nproc --all)" install \
  	&& cd .. && rm -rf SYMPHONY-$SYMPHONY_VER
  
  # calysto-scheme Jupyter kernel
  RUN pip install --upgrade calysto-scheme \
  	&& python3 -m calysto_scheme install
  
  # bash Jupyter kernel
  RUN pip install bash_kernel \
  	&& python3 -m bash_kernel.install
  
  # pigz: http://zlib.net/pigz/
  ENV PIGZ_VER 2.4
  
  RUN wget http://zlib.net/pigz/pigz-$PIGZ_VER.tar.gz \
  	&& tar xf pigz-$PIGZ_VER.tar.gz \
  	&& cd pigz-$PIGZ_VER \
  	&& make -j"$(nproc --all)" \
  	&& cp pigz /usr/local/bin \
  	&& cp unpigz /usr/local/bin \
  	&& cd .. && rm -rf pigz-$PIGZ_VER && rm -f pigz-$PIGZ_VER.tar.gz
  
  # uchardet: https://www.freedesktop.org/wiki/Software/uchardet/
  RUN git clone --depth=1 https://anongit.freedesktop.org/git/uchardet/uchardet.git \
  	&& cd uchardet \
  	&& cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release \
  	&& make -j"$(nproc --all)" \
  	&& make install \
  	&& cd .. && rm -rf uchardet
  
  ENV JAVA_HOME /etc/alternatives/java_sdk
  
  # Redis (https://redis.io)
  RUN wget http://download.redis.io/redis-stable.tar.gz \
  	&& tar xf redis-stable.tar.gz \
  	&& cd redis-stable \
  	&& make -j"$(nproc --all)" \
  	&& make install \
  	&& cd .. && rm -rf redis-stable && rm -f redis-stable.tar.gz
  
  # MongoDB (https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/)
  ADD mongodb-org-4.0.repo /etc/yum.repos.d/mongodb-org-4.0.repo
  
negative.code: 
  # R
  RUN yum -y install \
      lapack-devel \
      blas-devel \
      libicu-devel \
      unixodbc-devel \
      boost \
      boost-devel \
      libxml2 \
      libxml2-devel \
      R \
      && yum clean all
  
  # Set default CRAN Mirror
  RUN echo 'options(repos = c(CRAN="https://ftp.osuosl.org/pub/cran/"))' >> /usr/lib64/R/library/base/R/Rprofile
  