From 5105830612de173e99e37962758b38bab5f63a51 Mon Sep 17 00:00:00 2001 From: Theodore Kisner Date: Fri, 12 Jan 2018 09:54:29 -0800 Subject: [PATCH] Change back to installing conda into /usr to work around change in NERSC docker runtime environment. --- external/.dockerignore | 1 + external/tools/Dockerfile-intel.in | 16 +++++++++++----- external/tools/Dockerfile.in | 16 +++++++++++----- external/tools/apply_conf.sh | 7 ++----- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/external/.dockerignore b/external/.dockerignore index a72151022..066db6a0a 100644 --- a/external/.dockerignore +++ b/external/.dockerignore @@ -3,3 +3,4 @@ conf README* tools Docker* +install* diff --git a/external/tools/Dockerfile-intel.in b/external/tools/Dockerfile-intel.in index 9a45eed81..67979f4c6 100644 --- a/external/tools/Dockerfile-intel.in +++ b/external/tools/Dockerfile-intel.in @@ -17,8 +17,8 @@ RUN apt-get update \ # Set up locales, to workaround a pip bug RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 # We install everything directly into /usr so that we do @@ -47,6 +47,13 @@ ENV PYTHONUSERBASE "/tmp" @pip_pkgs@ +# The conda TCL packages overwrite the system-installed regex.h. So +# now we force reinstall of the package that provides that + +RUN apt-get update \ + && apt-get install -y --reinstall libc6-dev \ + && rm -fr /var/lib/apt/lists/* + # Install Intel tools to /opt/intel. We assume that the build context already # contains a copy of the Intel tools, and we just copy it into the image. @@ -66,8 +73,8 @@ RUN cp -a /opt/intel/mkl/lib/intel64/* /usr/lib/ RUN mkdir ./rules ADD rules/patch_* ./rules/ -RUN mkdir -p /usr/lib/python3.6/site-packages -ENV PYTHONPATH /usr/lib/python3.6/site-packages +#RUN mkdir -p /usr/lib/python3.6/site-packages +#ENV PYTHONPATH /usr/lib/python3.6/site-packages # Install MPICH 3.2 which is compatible with the external # Cray MPICH which is prepended to LD_LIBRARY_PATH as part @@ -183,4 +190,3 @@ ENV HOME /home/toast ENTRYPOINT ["/bin/bash", "-c"] CMD ["/bin/bash"] - diff --git a/external/tools/Dockerfile.in b/external/tools/Dockerfile.in index b476e7eaf..aed9b5db5 100644 --- a/external/tools/Dockerfile.in +++ b/external/tools/Dockerfile.in @@ -17,8 +17,8 @@ RUN apt-get update \ # Set up locales, to workaround a pip bug RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 # We install everything directly into /usr so that we do @@ -47,13 +47,20 @@ ENV PYTHONUSERBASE "/tmp" @pip_pkgs@ +# The conda TCL packages overwrite the system-installed regex.h. So +# now we force reinstall of the package that provides that + +RUN apt-get update \ + && apt-get install -y --reinstall libc6-dev \ + && rm -fr /var/lib/apt/lists/* + # Copy all patch files to current working directory RUN mkdir ./rules ADD rules/patch_* ./rules/ -RUN mkdir -p /usr/lib/python3.6/site-packages -ENV PYTHONPATH /usr/lib/python3.6/site-packages +#RUN mkdir -p /usr/lib/python3.6/site-packages +#ENV PYTHONPATH /usr/lib/python3.6/site-packages # Install MPICH 3.2 which is compatible with the external # Cray MPICH which is prepended to LD_LIBRARY_PATH as part @@ -149,4 +156,3 @@ RUN python -c "import matplotlib.font_manager as fm; f = fm.FontManager" ENTRYPOINT ["/bin/bash", "-c"] CMD ["/bin/bash"] - diff --git a/external/tools/apply_conf.sh b/external/tools/apply_conf.sh index 454c31046..46e30712b 100755 --- a/external/tools/apply_conf.sh +++ b/external/tools/apply_conf.sh @@ -14,7 +14,7 @@ module_dir="${moddir}/toast-deps" if [ "x${docker}" = "xyes" ]; then compiled_prefix="/usr" - conda_prefix="/usr/local" + conda_prefix="/usr" fi # Create list of substitutions @@ -27,7 +27,7 @@ while IFS='' read -r line || [[ -n "${line}" ]]; do if [ "${comment}" != "#" ]; then check=$(echo "${line}" | sed -e "s#.*=.*#=#") - + if [ "x${check}" = "x=" ]; then # get the variable and its value var=$(echo ${line} | sed -e "s#\([^=]*\)=.*#\1#" | awk '{print $1}') @@ -52,6 +52,3 @@ rm -f "${outfile}" while IFS='' read -r line || [[ -n "${line}" ]]; do echo "${line}" | eval sed ${confsub} >> "${outfile}" done < "${infile}" - - -