diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 6196fcf..1032bf9 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -9,47 +9,68 @@ jobs: matrix: include: - distro: alpine - conda_ver: 4.12.0 + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.11' + platform: linux/amd64 + py_label: py310_ + conda_sha256: 00938c3534750a0e4069499baf8f4e6dc1c2e471c86a59caa0dd03f4a9269db6 + - distro: alpine + conda_ver: '22.11.1' + conda_suffix: '-1' py_ver: '3.10' platform: linux/amd64 - py_label: py39_ - conda_md5: 4e2f31e0b2598634c80daa12e4981647 + py_label: py310_ + conda_sha256: 00938c3534750a0e4069499baf8f4e6dc1c2e471c86a59caa0dd03f4a9269db6 - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.9 + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.9' platform: linux/amd64 py_label: py39_ - conda_md5: 8c69f65a4ae27fb41df0fe552b4a8a3b + conda_sha256: e685005710679914a909bfb9c52183b3ccc56ad7bb84acc861d596fcbe5d28bb - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.8 + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.8' platform: linux/amd64 py_label: py38_ - conda_md5: 14da4a9a44b337f7ccb8363537f65b9c + conda_sha256: 473e5ecc8e078e9ef89355fbca21f8eefa5f9081544befca99867c7beac3150d - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.7 + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.7' platform: linux/amd64 py_label: py37_ - conda_md5: 9f186c1d86c266acc47dbc1603f0e2ed + conda_sha256: 22b14d52265b4e609c6ce78e2f2884b277d976b83b5f9c8a83423e3eba2ccfbe + - distro: debian + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.11' + platform: linux/amd64 + py_label: py310_ - distro: debian - conda_ver: 4.12.0 + conda_ver: '22.11.1' + conda_suffix: '-1' py_ver: '3.10' platform: linux/amd64 - py_label: py39_ + py_label: py310_ - distro: debian - conda_ver: 4.10.3 - py_ver: 3.9 + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.9' platform: linux/amd64 py_label: py39_ - distro: debian - conda_ver: 4.10.3 - py_ver: 3.8 + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.8' platform: linux/amd64 py_label: py38_ - distro: debian - conda_ver: 4.10.3 - py_ver: 3.7 + conda_ver: '22.11.1' + conda_suffix: '-1' + py_ver: '3.7' platform: linux/amd64 py_label: py37_ # - distro: debian @@ -70,14 +91,15 @@ jobs: env: DISTRO: ${{matrix.distro}} CONDA_VER: ${{matrix.conda_ver}} + CONDA_SUFFIX: ${{matrix.conda_suffix}} PY_VER: ${{matrix.py_ver}} PLATFORM: ${{matrix.platform}} PY_LABEL: ${{matrix.py_label}} - CONDA_MD5: ${{matrix.conda_md5}} + CONDA_SHA256: ${{matrix.conda_sha256}} DOCKER_CLIENT_TIMEOUT: "120" COMPOSE_HTTP_TIMEOUT: "120" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Determine platform tag run: | PLATFORM_TAG=$(echo "$PLATFORM" | tr '/' '_') @@ -103,7 +125,7 @@ jobs: docker save "${REF}" | \ gzip > "${CONDA_VER}-py${PY_VER}-${DISTRO}-${PLATFORM_TAG}.tar.gz" - name: Add image artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: > ${{format('{0}-py{1}-{2}-{3}', matrix.conda_ver, matrix.py_ver, matrix.distro, @@ -119,43 +141,53 @@ jobs: matrix: include: - distro: alpine - conda_ver: 4.12.0 + conda_ver: '22.11.1' + py_ver: '3.11' + platform: linux/amd64 + package_manager: apk + - distro: alpine + conda_ver: '22.11.1' py_ver: '3.10' platform: linux/amd64 package_manager: apk - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.9 + conda_ver: '22.11.1' + py_ver: '3.9' platform: linux/amd64 package_manager: apk - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.8 + conda_ver: '22.11.1' + py_ver: '3.8' platform: linux/amd64 package_manager: apk - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.7 + conda_ver: '22.11.1' + py_ver: '3.7' platform: linux/amd64 package_manager: apk - distro: debian - conda_ver: 4.12.0 + conda_ver: '22.11.1' + py_ver: '3.11' + platform: linux/amd64 + package_manager: apt + - distro: debian + conda_ver: '22.11.1' py_ver: '3.10' platform: linux/amd64 package_manager: apt - distro: debian - conda_ver: 4.10.3 - py_ver: 3.9 + conda_ver: '22.11.1' + py_ver: '3.9' platform: linux/amd64 package_manager: apt - distro: debian - conda_ver: 4.10.3 - py_ver: 3.8 + conda_ver: '22.11.1' + py_ver: '3.8' platform: linux/amd64 package_manager: apt - distro: debian - conda_ver: 4.10.3 - py_ver: 3.7 + conda_ver: '22.11.1' + py_ver: '3.7' platform: linux/amd64 package_manager: apt # - distro: debian @@ -180,13 +212,13 @@ jobs: PLATFORM: ${{matrix.platform}} PACKAGE_MANAGER: ${{matrix.package_manager}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Determine platform tag run: | PLATFORM_TAG=$(echo "$PLATFORM" | tr '/' '_') echo "PLATFORM_TAG=${PLATFORM_TAG}" >> $GITHUB_ENV - name: Fetch image artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: > ${{format('{0}-py{1}-{2}-{3}', matrix.conda_ver, matrix.py_ver, matrix.distro, @@ -213,36 +245,44 @@ jobs: matrix: include: - distro: alpine - conda_ver: 4.12.0 + conda_ver: '22.11.1' + py_ver: '3.11' + platform: linux/amd64 + - distro: alpine + conda_ver: '22.11.1' py_ver: '3.10' platform: linux/amd64 - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.9 + conda_ver: '22.11.1' + py_ver: '3.9' platform: linux/amd64 - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.8 + conda_ver: '22.11.1' + py_ver: '3.8' platform: linux/amd64 - distro: alpine - conda_ver: 4.10.3 - py_ver: 3.7 + conda_ver: '22.11.1' + py_ver: '3.7' + platform: linux/amd64 + - distro: debian + conda_ver: '22.11.1' + py_ver: '3.11' platform: linux/amd64 - distro: debian - conda_ver: 4.12.0 + conda_ver: '22.11.1' py_ver: '3.10' platform: linux/amd64 - distro: debian - conda_ver: 4.10.3 - py_ver: 3.9 + conda_ver: '22.11.1' + py_ver: '3.9' platform: linux/amd64 - distro: debian - conda_ver: 4.10.3 - py_ver: 3.8 + conda_ver: '22.11.1' + py_ver: '3.8' platform: linux/amd64 - distro: debian - conda_ver: 4.10.3 - py_ver: 3.7 + conda_ver: '22.11.1' + py_ver: '3.7' platform: linux/amd64 # - distro: debian # conda_ver: 4.10.3 @@ -264,13 +304,13 @@ jobs: DOCKER_USERNAME: ${{secrets.docker_username}} DOCKER_PASSWORD: ${{secrets.docker_password}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Determine platform tag run: | PLATFORM_TAG=$(echo "$PLATFORM" | tr '/' '_') echo "PLATFORM_TAG=${PLATFORM_TAG}" >> $GITHUB_ENV - name: Fetch image artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: > ${{format('{0}-py{1}-{2}-{3}', matrix.conda_ver, matrix.py_ver, matrix.distro, @@ -300,13 +340,13 @@ jobs: ) runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build docs uses: ammaraskar/sphinx-action@master with: docs-folder: "docs/" # - name: Upload docs artifact - # uses: actions/upload-artifact@v1 + # uses: actions/upload-artifact@v3 # with: # name: docs-html # path: docs/_build/html/ diff --git a/config/.env b/config/.env index e7a34d3..db3ab7f 100644 --- a/config/.env +++ b/config/.env @@ -1,30 +1,34 @@ ## build -# CONDA_VER=4.12.0 -# PY_VER='3.10' +# CONDA_VER=22.11.1 +# CONDA_SUFFIX=-1 +# PY_VER='3.11' +# PY_LABEL=py310_ +# CONDA_SHA256=00938c3534750a0e4069499baf8f4e6dc1c2e471c86a59caa0dd03f4a9269db6 + +CONDA_VER=22.11.1 +CONDA_SUFFIX=-1 +PY_VER='3.10' +PY_LABEL=py310_ +CONDA_SHA256=00938c3534750a0e4069499baf8f4e6dc1c2e471c86a59caa0dd03f4a9269db6 + +# CONDA_VER=22.11.1 +# CONDA_SUFFIX=-1 +# PY_VER='3.9' # PY_LABEL=py39_ -# CONDA_MD5=4e2f31e0b2598634c80daa12e4981647 +# CONDA_SHA256=e685005710679914a909bfb9c52183b3ccc56ad7bb84acc861d596fcbe5d28bb -CONDA_VER=4.10.3 -PY_VER=3.9 -PY_LABEL=py39_ -CONDA_MD5=8c69f65a4ae27fb41df0fe552b4a8a3b - -# CONDA_VER=4.10.3 -# PY_VER=3.8 +# CONDA_VER=22.11.1 +# CONDA_SUFFIX=-1 +# PY_VER='3.8' # PY_LABEL=py38_ -# CONDA_MD5=14da4a9a44b337f7ccb8363537f65b9c +# CONDA_SHA256=473e5ecc8e078e9ef89355fbca21f8eefa5f9081544befca99867c7beac3150d -# CONDA_VER=4.10.3 -# PY_VER=3.7 +# CONDA_VER=22.11.1 +# CONDA_SUFFIX=-1 +# PY_VER='3.7' # PY_LABEL=py37_ -# CONDA_MD5=9f186c1d86c266acc47dbc1603f0e2ed - -# CONDA_VER=4.5.4 -# PY_VER=3.6 -# CONDA_MD5=a946ea1d0c4a642ddf0c3a26a18bb16d - - +# CONDA_SHA256=22b14d52265b4e609c6ce78e2f2884b277d976b83b5f9c8a83423e3eba2ccfbe ## test diff --git a/dist/alpine/Dockerfile b/dist/alpine/Dockerfile index d59690a..64e1452 100644 --- a/dist/alpine/Dockerfile +++ b/dist/alpine/Dockerfile @@ -1,51 +1,52 @@ +# This could be a better upgrade: +# https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/alpine/Dockerfile + FROM alpine:3 as alpine-glibc LABEL MAINTAINER="Vlad Frolov" LABEL SRC=https://github.com/frol/docker-alpine-glibc ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 +# periodically needs to be updated (see above repo) +RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \ + ALPINE_GLIBC_PACKAGE_VERSION="2.34-r0" && \ + ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ + ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ + ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ + apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \ + echo \ + "-----BEGIN PUBLIC KEY-----\ + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\ + y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\ + tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\ + m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\ + KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\ + Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\ + 1QIDAQAB\ + -----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \ + wget \ + "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ + "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ + "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ + mv /etc/nsswitch.conf /etc/nsswitch.conf.bak && \ + apk add --no-cache --force-overwrite \ + "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ + "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ + "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \ + \ + mv /etc/nsswitch.conf.bak /etc/nsswitch.conf && \ + rm "/etc/apk/keys/sgerrand.rsa.pub" && \ + (/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true) && \ + echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \ + \ + apk del glibc-i18n && \ + \ + rm "/root/.wget-hsts" && \ + apk del .build-dependencies && \ + rm \ + "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \ + "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \ + "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" -RUN eval $'set -e\n\ - ALPINE_GLIBC_BASE_URL=$(echo "https://github.com/sgerrand/alpine-pkg-glibc\ - /releases/download" | tr -d "\n" | tr -d "\t")\n\ - ALPINE_GLIBC_PACKAGE_VERSION="2.28-r0"\n\ - ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk"\n\ - ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk"\n\ - ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk"\n\ - apk add --no-cache --virtual=.build-dependencies wget ca-certificates\n\ - cat <<-EOL > "/etc/apk/keys/sgerrand.rsa.pub"\n\ - -----BEGIN PUBLIC KEY-----\n\ - MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\n\ - y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\n\ - tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\n\ - m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\n\ - KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\n\ - Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\n\ - 1QIDAQAB\n\ - -----END PUBLIC KEY-----\n\ - EOL\n\ - wget \ - $(echo "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION\ - /$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" | tr -d "\n" | tr -d "\t")\ - $(echo "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION\ - /$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" | tr -d "\n" | tr -d "\t")\ - $(echo "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION\ - /$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" | tr -d "\n" | tr -d "\t")\n\ - apk add --no-cache \ - "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME"\ - "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME"\ - "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"\n\ - rm "/etc/apk/keys/sgerrand.rsa.pub"\n\ - /usr/glibc-compat/bin/localedef \ - --force --inputfile POSIX --charmap UTF-8 "$LANG" || true\n\ - echo "export LANG=$LANG" > /etc/profile.d/locale.sh\n\ - apk del glibc-i18n\n\ - rm "/root/.wget-hsts"\n\ - apk del .build-dependencies\n\ - rm \ - "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME"\ - "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME"\ - "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME"\n\ - ' # Temp Image to create exec to allow UID/GID to be updated on boot FROM golang:alpine as go_tmp COPY ./utilities/startup.go /startup.go @@ -57,7 +58,8 @@ LABEL maintainerName="Raphael Guzman" \ maintainerEmail="raphael@datajoint.com" \ maintainerCompany="DataJoint" ARG CONDA_VER -ARG CONDA_MD5 +ARG CONDA_SUFFIX +ARG CONDA_SHA256 ARG PY_LABEL ARG PY_VER # Create anaconda group, install dependencies, install Conda @@ -83,22 +85,20 @@ RUN \ apk add /tmp/glibc-i18n-2.25-r0.apk && \ rm /tmp/glibc-i18n-2.25-r0.apk && \ /usr/glibc-compat/bin/localedef -i en_US -c -f UTF-8 en_US.UTF-8 && \ - # Remove after 4.12.0 version releases - [ "${CONDA_VER}" != "4.12.0" ] || CONDA_VER="4.11.0" && \ # Current latest Miniconda3 release wget --quiet $(echo "https://repo.anaconda.com/miniconda\ - /Miniconda3-${PY_LABEL}${CONDA_VER}-Linux-x86_64.sh" | \ + /Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh" | \ tr -d '\n' | tr -d '\t') && \ # wget --quiet $(echo "https://repo.continuum.io/miniconda\ - # /Miniconda3-${PY_LABEL}${CONDA_VER}-Linux-x86_64.sh" | \ + # /Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh" | \ # tr -d '\n' | tr -d '\t') && \ - echo "${CONDA_MD5} Miniconda3-${PY_LABEL}${CONDA_VER}-Linux-x86_64.sh" \ - > miniconda.md5 && \ - if [ $(md5sum -c miniconda.md5 | awk '{print $2}') != "OK" ] ; then exit 1; fi && \ - mv Miniconda3-${PY_LABEL}${CONDA_VER}-Linux-x86_64.sh miniconda.sh && \ + echo "${CONDA_SHA256} Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh" \ + > miniconda.sha256 && \ + if [ $(sha256sum -c miniconda.sha256 | awk '{print $2}') != "OK" ] ; then exit 1; fi && \ + mv Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-x86_64.sh miniconda.sh && \ mkdir -p /opt && \ sh ./miniconda.sh -b -p /opt/conda && \ - rm miniconda.sh miniconda.md5 && \ + rm miniconda.sh miniconda.sha256 && \ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ find /opt/conda/ -follow -type f -name '*.a' -delete && \ find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ @@ -114,7 +114,7 @@ RUN \ umask u+rwx,g+rwx,o-rwx && \ conda config --add channels conda-forge && \ conda config --set auto_update_conda False && \ - [ "${PY_VER}" != "3.10" ] || conda install python=${PY_VER} conda=${CONDA_VER} && \ + [ "${PY_VER}" != "3.11" ] || conda install python=${PY_VER} conda=${CONDA_VER} && \ # allow gui for gnome apps # conda install -yc conda-forge gtk2 && \ find /opt/conda/conda-meta -user anaconda -exec chmod u+rwx,g+rwx,o-rwx "{}" \; && \ diff --git a/dist/alpine/docker-compose.yaml b/dist/alpine/docker-compose.yaml index 04b89b3..de4845c 100644 --- a/dist/alpine/docker-compose.yaml +++ b/dist/alpine/docker-compose.yaml @@ -6,7 +6,8 @@ services: dockerfile: dist/alpine/Dockerfile args: - CONDA_VER - - CONDA_MD5 + - CONDA_SUFFIX + - CONDA_SHA256 - PY_LABEL - PY_VER image: datajoint/miniconda3:${CONDA_VER}-py${PY_VER}-alpine diff --git a/dist/debian/Dockerfile b/dist/debian/Dockerfile index cb43d34..daf97b5 100644 --- a/dist/debian/Dockerfile +++ b/dist/debian/Dockerfile @@ -1,3 +1,6 @@ +# This could be a better upgrade: +# https://github.com/ContinuumIO/docker-images/blob/master/miniconda3/debian/Dockerfile + #Temp Image to create exec to allow UID/GID to be updated on boot FROM golang:alpine as go_tmp COPY ./utilities/startup.go /startup.go @@ -11,6 +14,7 @@ LABEL maintainerName="Raphael Guzman" \ ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 ARG CONDA_VER +ARG CONDA_SUFFIX ARG PY_LABEL ARG PY_VER # Create anaconda group user, install dependencies, install Conda @@ -37,14 +41,12 @@ RUN \ # bzip2 ca-certificates libglib2.0-0 libxext6 libsm6 \ # libxrender1 git mercurial subversion && \ apt-get clean && \ - # Remove after 4.12.0 version releases - [ "${CONDA_VER}" != "4.12.0" ] || CONDA_VER="4.11.0" && \ wget --quiet $(echo "https://repo.anaconda.com/miniconda\ - /Miniconda3-${PY_LABEL}${CONDA_VER}-Linux-$(uname -m).sh" | \ + /Miniconda3-${PY_LABEL}${CONDA_VER}${CONDA_SUFFIX}-Linux-$(uname -m).sh" | \ tr -d "\n" | tr -d "\t") -O ~/miniconda.sh && \ /bin/bash ~/miniconda.sh -b -p /opt/conda && \ rm ~/miniconda.sh && \ - /opt/conda/bin/conda clean -tipsy && \ + /opt/conda/bin/conda clean -tipy && \ ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ find /opt/conda/ -follow -type f -name '*.a' -delete && \ find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ @@ -59,7 +61,7 @@ RUN \ umask u+rwx,g+rwx,o-rwx && \ conda config --add channels conda-forge && \ conda config --set auto_update_conda False && \ - [ "${PY_VER}" != "3.10" ] || conda install python=${PY_VER} conda=${CONDA_VER} && \ + [ "${PY_VER}" != "3.11" ] || conda install python=${PY_VER} conda=${CONDA_VER} && \ # allow gui for gnome apps # conda install -yc conda-forge gtk2 && \ find /opt/conda/conda-meta -user anaconda -exec chmod u+rwx,g+rwx,o-rwx "{}" \; && \ diff --git a/dist/debian/docker-compose.yaml b/dist/debian/docker-compose.yaml index 19df2d2..42edfd6 100644 --- a/dist/debian/docker-compose.yaml +++ b/dist/debian/docker-compose.yaml @@ -6,6 +6,7 @@ services: dockerfile: dist/debian/Dockerfile args: - CONDA_VER + - CONDA_SUFFIX - PY_LABEL - PY_VER image: datajoint/miniconda3:${CONDA_VER}-py${PY_VER}-debian diff --git a/tests/main.sh b/tests/main.sh index 6c2a808..de3b391 100755 --- a/tests/main.sh +++ b/tests/main.sh @@ -157,30 +157,34 @@ IMAGE=$(echo $REF | awk -F':' '{print $1}') SHELL_CMD_TEMPLATE="docker run --rm -i \$SHELL_CMD_FLAGS $REF \ $(docker inspect "$REF" --format '{{join .Config.Cmd " "}}') -c" # Determine reference size -if [ $DISTRO == alpine ] && [ $PY_VER == '3.10' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=478 +if [ $DISTRO == alpine ] && [ $PY_VER == '3.11' ] && [ $PLATFORM == 'linux/amd64' ]; then + SIZE_LIMIT=469 +elif [ $DISTRO == alpine ] && [ $PY_VER == '3.10' ] && [ $PLATFORM == 'linux/amd64' ]; then + SIZE_LIMIT=270 elif [ $DISTRO == alpine ] && [ $PY_VER == '3.9' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=240 + SIZE_LIMIT=259 elif [ $DISTRO == alpine ] && [ $PY_VER == '3.8' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=188 + SIZE_LIMIT=254 elif [ $DISTRO == alpine ] && [ $PY_VER == '3.7' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=196 + SIZE_LIMIT=223 +elif [ $DISTRO == debian ] && [ $PY_VER == '3.11' ] && [ $PLATFORM == 'linux/amd64' ]; then + SIZE_LIMIT=560 elif [ $DISTRO == debian ] && [ $PY_VER == '3.10' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=572 + SIZE_LIMIT=362 elif [ $DISTRO == debian ] && [ $PY_VER == '3.9' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=311 #481 + SIZE_LIMIT=351 elif [ $DISTRO == debian ] && [ $PY_VER == '3.8' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=265 #428 + SIZE_LIMIT=346 elif [ $DISTRO == debian ] && [ $PY_VER == '3.7' ] && [ $PLATFORM == 'linux/amd64' ]; then - SIZE_LIMIT=269 #437 -elif [ $DISTRO == debian ] && [ $PY_VER == '3.9' ] && [ $PLATFORM == 'linux/arm64' ]; then - SIZE_LIMIT=505 -elif [ $DISTRO == debian ] && [ $PY_VER == '3.8' ] && [ $PLATFORM == 'linux/arm64' ]; then - SIZE_LIMIT=450 -elif [ $DISTRO == debian ] && [ $PY_VER == '3.7' ] && [ $PLATFORM == 'linux/arm64' ]; then - SIZE_LIMIT=460 + SIZE_LIMIT=316 +# elif [ $DISTRO == debian ] && [ $PY_VER == '3.9' ] && [ $PLATFORM == 'linux/arm64' ]; then +# SIZE_LIMIT=505 +# elif [ $DISTRO == debian ] && [ $PY_VER == '3.8' ] && [ $PLATFORM == 'linux/arm64' ]; then +# SIZE_LIMIT=450 +# elif [ $DISTRO == debian ] && [ $PY_VER == '3.7' ] && [ $PLATFORM == 'linux/arm64' ]; then +# SIZE_LIMIT=460 fi -SIZE_LIMIT=$(echo "scale=4; $SIZE_LIMIT * 1.17" | bc) +SIZE_LIMIT=$(echo "scale=4; $SIZE_LIMIT * 1.05" | bc) # Verify size minimal SIZE=$(docker images --filter "reference=$REF" --format "{{.Size}}" | awk -F'MB' '{print $1}') assert "minimal footprint" "(( $(echo "$SIZE <= $SIZE_LIMIT" | bc -l) ))" $LINENO