|
| 1 | +FROM circleci/openjdk:8-jdk |
| 2 | + |
| 3 | +ENV MINICONDA_VERSION=4.8.2 \ |
| 4 | + MINICONDA_MD5=87e77f097f6ebb5127c77662dfc3165e \ |
| 5 | + CONDA_VERSION=4.8.2 \ |
| 6 | + CONDA_DIR=/opt/conda \ |
| 7 | + PYTHON_VERSION=3.7.7 |
| 8 | + |
| 9 | +USER root |
| 10 | + |
| 11 | +ENV PATH=$CONDA_DIR/bin:$PATH |
| 12 | + |
| 13 | +COPY --chown=3434:3434 fix-permissions /tmp |
| 14 | + |
| 15 | +RUN \ |
| 16 | + apt-get update && \ |
| 17 | + apt-get install -yq --no-install-recommends \ |
| 18 | + sudo \ |
| 19 | + wget \ |
| 20 | + bzip2 \ |
| 21 | + file \ |
| 22 | + libtinfo5 \ |
| 23 | + ca-certificates \ |
| 24 | + gettext-base \ |
| 25 | + locales && \ |
| 26 | + apt-get clean && \ |
| 27 | + rm -rf /var/lib/apt/lists/* |
| 28 | + |
| 29 | +RUN \ |
| 30 | + cd /tmp && \ |
| 31 | + mkdir -p $CONDA_DIR && \ |
| 32 | + wget --quiet https://repo.continuum.io/miniconda/Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \ |
| 33 | + echo "${MINICONDA_MD5} *Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh" | md5sum -c - && \ |
| 34 | + /bin/bash Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \ |
| 35 | + rm Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \ |
| 36 | + conda config --system --set auto_update_conda false && \ |
| 37 | + conda config --system --set show_channel_urls true && \ |
| 38 | + conda config --system --set channel_priority strict && \ |
| 39 | + if [ ! $PYTHON_VERSION = 'default' ]; then conda install --yes python=$PYTHON_VERSION; fi && \ |
| 40 | + conda list python | grep '^python ' | tr -s ' ' | cut -d '.' -f 1,2 | sed 's/$/.*/' >> $CONDA_DIR/conda-meta/pinned && \ |
| 41 | + conda install --quiet --yes conda && \ |
| 42 | + conda install --quiet --yes pip && \ |
| 43 | + echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \ |
| 44 | + conda clean --all --force-pkgs-dirs --yes --quiet && \ |
| 45 | + sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null |
| 46 | + |
| 47 | +COPY requirements-conda.txt /tmp/ |
| 48 | + |
| 49 | +RUN \ |
| 50 | + conda install --channel conda-forge --no-channel-priority --freeze-installed \ |
| 51 | + --file /tmp/requirements-conda.txt && \ |
| 52 | + conda clean --all --force-pkgs-dirs --yes --quiet && \ |
| 53 | + sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null && \ |
| 54 | + ldconfig 2> /dev/null |
| 55 | + |
| 56 | +# Work-around for pyproj issue https://github.com/pyproj4/pyproj/issues/415 |
| 57 | +ENV PROJ_LIB=/opt/conda/share/proj |
| 58 | + |
| 59 | +USER 3434 |
| 60 | + |
| 61 | +WORKDIR /home/circleci |
0 commit comments