|
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 |
| 1 | +FROM circleci/openjdk:11-jdk |
| 2 | +#LABEL org.opencontainers.image.source=https://github.com/locationtech/rasterframes |
8 | 3 |
|
9 | 4 | USER root |
10 | 5 |
|
11 | | -ENV PATH=$CONDA_DIR/bin:$PATH |
12 | | - |
13 | | -# circleci is 3434 |
14 | | -COPY --chown=3434:3434 fix-permissions /tmp |
15 | | - |
| 6 | +# See: https://docs.conda.io/projects/conda/en/latest/user-guide/install/rpm-debian.html |
16 | 7 | RUN \ |
17 | | - apt-get update && \ |
18 | | - apt-get install -yq --no-install-recommends \ |
19 | | - sudo \ |
20 | | - wget \ |
21 | | - bzip2 \ |
22 | | - file \ |
23 | | - libtinfo5 \ |
24 | | - ca-certificates \ |
25 | | - gettext-base \ |
26 | | - locales && \ |
27 | | - apt-get clean && \ |
28 | | - rm -rf /var/lib/apt/lists/* |
| 8 | + curl -s https://repo.anaconda.com/pkgs/misc/gpgkeys/anaconda.asc | gpg --dearmor > conda.gpg && \ |
| 9 | + install -o root -g root -m 644 conda.gpg /usr/share/keyrings/conda-archive-keyring.gpg && \ |
| 10 | + gpg --keyring /usr/share/keyrings/conda-archive-keyring.gpg --no-default-keyring --fingerprint 34161F5BF5EB1D4BFBBB8F0A8AEB4F8B29D82806 && \ |
| 11 | + echo "deb [arch=amd64 signed-by=/usr/share/keyrings/conda-archive-keyring.gpg] https://repo.anaconda.com/pkgs/misc/debrepo/conda stable main" > /etc/apt/sources.list.d/conda.list |
29 | 12 |
|
30 | 13 | RUN \ |
31 | | - cd /tmp && \ |
32 | | - mkdir -p $CONDA_DIR && \ |
33 | | - wget --quiet https://repo.continuum.io/miniconda/Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \ |
34 | | - echo "${MINICONDA_MD5} *Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh" | md5sum -c - && \ |
35 | | - /bin/bash Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR && \ |
36 | | - rm Miniconda3-py37_${MINICONDA_VERSION}-Linux-x86_64.sh && \ |
37 | | - conda config --system --set auto_update_conda false && \ |
38 | | - conda config --system --set show_channel_urls true && \ |
39 | | - conda config --system --set channel_priority strict && \ |
40 | | - if [ ! $PYTHON_VERSION = 'default' ]; then conda install --yes python=$PYTHON_VERSION; fi && \ |
41 | | - conda list python | grep '^python ' | tr -s ' ' | cut -d '.' -f 1,2 | sed 's/$/.*/' >> $CONDA_DIR/conda-meta/pinned && \ |
42 | | - conda install --quiet --yes conda && \ |
43 | | - conda install --quiet --yes pip && \ |
44 | | - pip config set global.progress_bar off && \ |
45 | | - echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \ |
46 | | - conda clean --all --force-pkgs-dirs --yes --quiet && \ |
47 | | - sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null |
| 14 | + apt-get update && \ |
| 15 | + apt-get install -yq --no-install-recommends conda && \ |
| 16 | + apt-get clean && \ |
| 17 | + rm -rf /var/lib/apt/lists/* |
48 | 18 |
|
49 | | -COPY requirements-conda.txt /tmp/ |
| 19 | +ENV CONDA_DIR=/opt/conda |
| 20 | +ENV PATH=$CONDA_DIR/bin:$PATH |
50 | 21 |
|
| 22 | +COPY requirements-conda.txt fix-permissions /tmp |
51 | 23 | RUN \ |
52 | | - conda install --channel conda-forge --no-channel-priority --freeze-installed \ |
53 | | - --file /tmp/requirements-conda.txt && \ |
| 24 | + conda install --quiet --yes --channel=conda-forge --file=/tmp/requirements-conda.txt && \ |
| 25 | + echo "$CONDA_DIR/lib" > /etc/ld.so.conf.d/conda.conf && \ |
| 26 | + ldconfig && \ |
54 | 27 | conda clean --all --force-pkgs-dirs --yes --quiet && \ |
55 | | - sh /tmp/fix-permissions $CONDA_DIR 2> /dev/null && \ |
56 | | - ldconfig 2> /dev/null |
| 28 | + sh /tmp/fix-permissions $CONDA_DIR |
| 29 | + |
57 | 30 |
|
58 | 31 | # Work-around for pyproj issue https://github.com/pyproj4/pyproj/issues/415 |
59 | 32 | ENV PROJ_LIB=/opt/conda/share/proj |
60 | 33 |
|
61 | 34 | USER 3434 |
62 | | - |
63 | 35 | WORKDIR /home/circleci |
0 commit comments