From 6ca13949bf2c65f6d9f5d3eae2597d982bf9ec6c Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 4 Sep 2024 21:57:34 +0100 Subject: [PATCH 1/5] build: remove redundant / duplicate dockerfiles --- scripts/docker/Dockerfile.backend | 95 ----------------------- scripts/docker/tasking-manager/Dockerfile | 43 ---------- 2 files changed, 138 deletions(-) delete mode 100644 scripts/docker/Dockerfile.backend delete mode 100644 scripts/docker/tasking-manager/Dockerfile diff --git a/scripts/docker/Dockerfile.backend b/scripts/docker/Dockerfile.backend deleted file mode 100644 index c9f5b46af5..0000000000 --- a/scripts/docker/Dockerfile.backend +++ /dev/null @@ -1,95 +0,0 @@ -ARG DEBIAN_IMG_TAG=slim-bookworm -ARG PYTHON_IMG_TAG=3.10 - -FROM docker.io/python:${PYTHON_IMG_TAG}-${DEBIAN_IMG_TAG} as base -ARG APP_VERSION=0.1.0 -ARG DOCKERFILE_VERSION=0.5.0 -ARG ALPINE_IMG_TAG -ARG PYTHON_IMG_TAG -ARG MAINTAINER=sysadmin@hotosm.org -LABEL org.hotosm.tasks.app-version="${APP_VERSION}" \ - org.hotosm.tasks.debian-img-tag="${DEBIAN_IMG_TAG}" \ - org.hotosm.tasks.python-img-tag="${PYTHON_IMG_TAG}" \ - org.hotosm.tasks.dockerfile-version="${DOCKERFILE_VERSION}" \ - org.hotosm.tasks.maintainer="${MAINTAINER}" \ - org.hotosm.tasks.api-port="5000" -# Fix timezone (do not change - see issue #3638) -ENV TZ UTC -# Add non-root user, permissions, init log dir -RUN useradd --uid 9000 --create-home --home /home/appuser --shell /bin/false appuser - - - - -FROM base as extract-deps -RUN pip install --no-cache-dir --upgrade pip -WORKDIR /opt/python -COPY pyproject.toml pdm.lock README.md /opt/python/ -RUN pip install --no-cache-dir pdm==2.8.0 -RUN pdm export --prod --without-hashes > requirements.txt - - - -FROM base as build -RUN pip install --no-cache-dir --upgrade pip -WORKDIR /opt/python -# Setup backend build-time dependencies -RUN apt-get update && apt-get install --no-install-recommends -y \ - build-essential \ - postgresql-server-dev-15 \ - python3-dev \ - libffi-dev \ - libgeos-dev -# Setup backend Python dependencies -COPY --from=extract-deps \ - /opt/python/requirements.txt /opt/python/ -USER appuser:appuser -RUN pip install --user --no-warn-script-location \ - --no-cache-dir -r /opt/python/requirements.txt - - - -FROM base as runtime -ARG PYTHON_IMG_TAG -WORKDIR /usr/src/app -ENV PYTHONDONTWRITEBYTECODE=1 \ - PYTHONUNBUFFERED=1 \ - PYTHONFAULTHANDLER=1 \ - PATH="/home/appuser/.local/bin:$PATH" \ - PYTHON_LIB="/home/appuser/.local/lib/python$PYTHON_IMG_TAG/site-packages" \ - SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \ - REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt -# Setup backend runtime dependencies -RUN apt-get update && \ - apt-get install --no-install-recommends -y \ - postgresql-client libgeos3.11.1 proj-bin && \ - apt-get clean && rm -rf /var/lib/apt/lists/* -COPY --from=build \ - /home/appuser/.local \ - /home/appuser/.local -USER appuser:appuser -COPY backend backend/ -COPY migrations migrations/ -COPY scripts/world scripts/world/ -COPY scripts/database scripts/database/ -COPY manage.py . - - - -FROM runtime as debug -RUN pip install --user --no-warn-script-location \ - --no-cache-dir debugpy==1.8.1 -CMD ["python", "-m", "debugpy", "--wait-for-client", "--listen", "0.0.0.0:5678", \ - "-m", "gunicorn", "-c", "python:backend.gunicorn", "manage:application", \ - "--reload", "--log-level", "error"] - - - -FROM runtime as prod -# Pre-compile packages to .pyc (init speed gains) -USER root -RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)" -RUN python -m compileall . -USER appuser:appuser -CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application", \ - "--log-level", "error"] diff --git a/scripts/docker/tasking-manager/Dockerfile b/scripts/docker/tasking-manager/Dockerfile deleted file mode 100644 index 52055a2590..0000000000 --- a/scripts/docker/tasking-manager/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -ARG PYTHON_IMG_TAG=3.10 -FROM python:${PYTHON_IMG_TAG}-bookworm - -RUN mkdir -p /usr/src/app -WORKDIR /usr/src/app - -ENV PATH="/usr/src/app/__pypackages__/${PYTHON_IMG_TAG}/bin:$PATH" \ - PYTHONPATH="/usr/src/app/__pypackages__/${PYTHON_IMG_TAG}/lib" - -# INSTALLATION - -# Add repository for node -RUN curl --fail --silent --show-error --location https://deb.nodesource.com/setup_18.x | bash - - -# Install dependencies -RUN apt-get update \ - && apt-get upgrade -y \ - && apt-get install -y nodejs libgeos-dev \ - && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# Upgrade pip -RUN pip install --upgrade pip - -# Get the Tasking Manager -ARG branch=develop -RUN git clone --depth=1 git://github.com/hotosm/tasking-manager.git \ - --branch $branch /usr/src/app - -## SETUP - -# Setup backend dependencies -COPY pyproject.toml pdm.lock README.md ./ -RUN pip install --no-cache-dir pdm \ - && pdm config python.use_venv false \ - && pdm install --prod --no-lock --no-editable - -# Setup and build frontend -RUN cd frontend && npm install && npm run build - -# INITIALIZATION - -EXPOSE 5000 -CMD ["pdm", "run", "flask", "run", "-h", "0.0.0.0"] From 2508ae0f04be2650f7614f623e7528f10f7a54c9 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 4 Sep 2024 22:13:13 +0100 Subject: [PATCH 2/5] build: apply dockerfile updates from PR #6436 --- .circleci/config.yml | 2 +- Dockerfile | 13 +++++++------ .../aws/cloudformation/tasking-manager.template.js | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 08e1667bff..1b9167a8a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -81,7 +81,7 @@ jobs: - run: sudo apt-get update - run: sudo apt-get -y install libgeos-dev # Required for shapely - run: sudo apt-get -y install proj-bin libproj-dev - - run: pip install --upgrade pip pdm==2.7.4 + - run: pip install --upgrade pip pdm==2.18.1 - run: pdm export --dev --without-hashes > requirements.txt - run: pip install -r requirements.txt - run: mkdir --mode 766 -p /tmp/logs diff --git a/Dockerfile b/Dockerfile index 178c3444a5..4514086ec7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ FROM base as extract-deps RUN pip install --no-cache-dir --upgrade pip WORKDIR /opt/python COPY pyproject.toml pdm.lock README.md /opt/python/ -RUN pip install --no-cache-dir pdm==2.7.4 +RUN pip install --no-cache-dir pdm==2.18.1 RUN pdm export --prod --without-hashes > requirements.txt @@ -34,9 +34,8 @@ FROM base as build RUN pip install --no-cache-dir --upgrade pip WORKDIR /opt/python # Setup backend build-time dependencies -RUN apt-get update -RUN apt-get install --no-install-recommends -y build-essential -RUN apt-get install --no-install-recommends -y \ +RUN apt-get update && apt-get install --no-install-recommends -y \ + build-essential \ postgresql-server-dev-15 \ python3-dev \ libffi-dev \ @@ -79,7 +78,7 @@ COPY manage.py . FROM runtime as debug RUN pip install --user --no-warn-script-location \ - --no-cache-dir debugpy==1.6.7 + --no-cache-dir debugpy==1.8.5 EXPOSE 5678/tcp CMD ["python", "-m", "debugpy", "--wait-for-client", "--listen", "0.0.0.0:5678", \ "-m", "gunicorn", "-c", "python:backend.gunicorn", "manage:application", \ @@ -98,5 +97,7 @@ RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1) RUN python -m compileall . EXPOSE 5000/tcp USER appuser:appuser +# Default gunicorn worker count is 1 +# For prod the WEB_CONCURRENCY env var can be used to set this CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application", \ - "--workers", "1", "--log-level", "error"] + "--log-level", "error"] diff --git a/scripts/aws/cloudformation/tasking-manager.template.js b/scripts/aws/cloudformation/tasking-manager.template.js index f5bc32f280..c0760e765f 100644 --- a/scripts/aws/cloudformation/tasking-manager.template.js +++ b/scripts/aws/cloudformation/tasking-manager.template.js @@ -437,7 +437,7 @@ const Resources = { 'git clone --recursive https://github.com/hotosm/tasking-manager.git /opt/tasking-manager', 'cd /opt/tasking-manager/', cf.sub('git reset --hard ${GitSha}'), - 'pip install --upgrade pip pdm==2.7.4', + 'pip install --upgrade pip pdm==2.18.1', 'pdm export --prod > requirements.txt', 'wget -6 https://s3.dualstack.us-east-1.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz -O /tmp/aws-cfn-bootstrap-py3-latest.tar.gz', 'pip install /tmp/aws-cfn-bootstrap-py3-latest.tar.gz', From 039350d7a074a11ee7d23e4d31556453d407f275 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 4 Sep 2024 23:12:15 +0100 Subject: [PATCH 3/5] build: relock pdm after version update + strategy=inherit_metadata --- pdm.lock | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 110 insertions(+), 5 deletions(-) diff --git a/pdm.lock b/pdm.lock index ff909dec8c..2a1f53d365 100644 --- a/pdm.lock +++ b/pdm.lock @@ -3,19 +3,24 @@ [metadata] groups = ["default", "dev", "lint", "test"] -cross_platform = true -static_urls = false -lock_version = "4.3" -content_hash = "sha256:2accc44cf24a1ed889560e3ba7c4eb43ac6305e8698838ae84ce36974020cf72" +strategy = ["cross_platform", "inherit_metadata"] +lock_version = "4.5.0" +content_hash = "sha256:cc71db9fff34bb60941d621046a2b8b25eba61a67353e9ae05f0416376cc56d8" + +[[metadata.targets]] +requires_python = ">=3.9,<=3.11" [[package]] name = "alembic" version = "1.11.1" requires_python = ">=3.7" summary = "A database migration tool for SQLAlchemy." +groups = ["default"] dependencies = [ "Mako", "SQLAlchemy>=1.3.0", + "importlib-metadata; python_version < \"3.9\"", + "importlib-resources; python_version < \"3.9\"", "typing-extensions>=4", ] files = [ @@ -27,6 +32,7 @@ files = [ name = "aniso8601" version = "9.0.1" summary = "A library for parsing ISO 8601 strings." +groups = ["default"] files = [ {file = "aniso8601-9.0.1-py2.py3-none-any.whl", hash = "sha256:1d2b7ef82963909e93c4f24ce48d4de9e66009a21bf1c1e1c85bdd0812fe412f"}, {file = "aniso8601-9.0.1.tar.gz", hash = "sha256:72e3117667eedf66951bb2d93f4296a56b94b078a8a95905a052611fb3f1b973"}, @@ -37,6 +43,7 @@ name = "apscheduler" version = "3.10.1" requires_python = ">=3.6" summary = "In-process task scheduler with Cron-like capabilities" +groups = ["default"] dependencies = [ "pytz", "setuptools>=0.7", @@ -53,6 +60,7 @@ name = "black" version = "23.7.0" requires_python = ">=3.8" summary = "The uncompromising code formatter." +groups = ["lint"] dependencies = [ "click>=8.0.0", "mypy-extensions>=0.4.3", @@ -82,6 +90,7 @@ name = "bleach" version = "6.0.0" requires_python = ">=3.7" summary = "An easy safelist-based HTML-sanitizing tool." +groups = ["default"] dependencies = [ "six>=1.9.0", "webencodings", @@ -96,6 +105,7 @@ name = "blinker" version = "1.6.2" requires_python = ">=3.7" summary = "Fast, simple object-to-object and broadcast signaling" +groups = ["default"] files = [ {file = "blinker-1.6.2-py3-none-any.whl", hash = "sha256:c3d739772abb7bc2860abf5f2ec284223d9ad5c76da018234f6f50d6f31ab1f0"}, {file = "blinker-1.6.2.tar.gz", hash = "sha256:4afd3de66ef3a9f8067559fb7a1cbe555c17dcbe15971b05d1b625c3e7abe213"}, @@ -106,6 +116,7 @@ name = "cachetools" version = "5.3.1" requires_python = ">=3.7" summary = "Extensible memoizing collections and decorators" +groups = ["default"] files = [ {file = "cachetools-5.3.1-py3-none-any.whl", hash = "sha256:95ef631eeaea14ba2e36f06437f36463aac3a096799e876ee55e5cdccb102590"}, {file = "cachetools-5.3.1.tar.gz", hash = "sha256:dce83f2d9b4e1f732a8cd44af8e8fab2dbe46201467fc98b3ef8f269092bf62b"}, @@ -116,6 +127,7 @@ name = "certifi" version = "2023.5.7" requires_python = ">=3.6" summary = "Python package for providing Mozilla's CA Bundle." +groups = ["default"] files = [ {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, @@ -125,6 +137,8 @@ files = [ name = "cffi" version = "1.15.1" summary = "Foreign Function Interface for Python calling C code." +groups = ["default"] +marker = "platform_python_implementation == \"CPython\" and sys_platform == \"win32\"" dependencies = [ "pycparser", ] @@ -169,6 +183,7 @@ name = "charset-normalizer" version = "3.1.0" requires_python = ">=3.7.0" summary = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +groups = ["default"] files = [ {file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"}, @@ -224,8 +239,10 @@ name = "click" version = "8.1.3" requires_python = ">=3.7" summary = "Composable command line interface toolkit" +groups = ["default", "lint"] dependencies = [ "colorama; platform_system == \"Windows\"", + "importlib-metadata; python_version < \"3.8\"", ] files = [ {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, @@ -237,6 +254,8 @@ name = "colorama" version = "0.4.6" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" summary = "Cross-platform colored terminal text." +groups = ["default", "lint", "test"] +marker = "sys_platform == \"win32\" or platform_system == \"Windows\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -247,6 +266,7 @@ name = "coverage" version = "7.2.7" requires_python = ">=3.7" summary = "Code coverage measurement for Python" +groups = ["test"] files = [ {file = "coverage-7.2.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d39b5b4f2a66ccae8b7263ac3c8170994b65266797fb96cbbfd3fb5b23921db8"}, {file = "coverage-7.2.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6d040ef7c9859bb11dfeb056ff5b3872436e3b5e401817d87a31e1750b9ae2fb"}, @@ -287,6 +307,8 @@ name = "exceptiongroup" version = "1.1.1" requires_python = ">=3.7" summary = "Backport of PEP 654 (exception groups)" +groups = ["test"] +marker = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.1.1-py3-none-any.whl", hash = "sha256:232c37c63e4f682982c8b6459f33a8981039e5fb8756b2074364e5055c498c9e"}, {file = "exceptiongroup-1.1.1.tar.gz", hash = "sha256:d484c3090ba2889ae2928419117447a14daf3c1231d5e30d0aae34f354f01785"}, @@ -297,6 +319,7 @@ name = "flake8" version = "6.1.0" requires_python = ">=3.8.1" summary = "the modular source code checker: pep8 pyflakes and co" +groups = ["lint"] dependencies = [ "mccabe<0.8.0,>=0.7.0", "pycodestyle<2.12.0,>=2.11.0", @@ -312,6 +335,7 @@ name = "flask" version = "2.3.2" requires_python = ">=3.8" summary = "A simple framework for building complex web applications." +groups = ["default"] dependencies = [ "Jinja2>=3.1.2", "Werkzeug>=2.3.3", @@ -329,6 +353,7 @@ files = [ name = "flask-cors" version = "4.0.0" summary = "A Flask extension adding a decorator for CORS support" +groups = ["default"] dependencies = [ "Flask>=0.9", ] @@ -341,6 +366,7 @@ files = [ name = "flask-httpauth" version = "4.8.0" summary = "HTTP authentication for Flask routes" +groups = ["default"] dependencies = [ "flask", ] @@ -353,6 +379,7 @@ files = [ name = "flask-mail" version = "0.9.1" summary = "Flask extension for sending email" +groups = ["default"] dependencies = [ "Flask", "blinker", @@ -366,6 +393,7 @@ name = "flask-migrate" version = "4.0.4" requires_python = ">=3.6" summary = "SQLAlchemy database migrations for Flask applications using Alembic." +groups = ["default"] dependencies = [ "Flask-SQLAlchemy>=1.0", "Flask>=0.9", @@ -380,6 +408,7 @@ files = [ name = "flask-restful" version = "0.3.10" summary = "Simple framework for creating REST APIs" +groups = ["default"] dependencies = [ "Flask>=0.8", "aniso8601>=0.82", @@ -396,6 +425,7 @@ name = "flask-sqlalchemy" version = "3.0.5" requires_python = ">=3.7" summary = "Add SQLAlchemy support to your Flask application." +groups = ["default"] dependencies = [ "flask>=2.2.5", "sqlalchemy>=1.4.18", @@ -409,6 +439,7 @@ files = [ name = "flask-swagger" version = "0.2.14" summary = "Extract swagger specs from your flask project" +groups = ["default"] dependencies = [ "Flask>=0.10", "PyYAML>=5.1", @@ -422,6 +453,7 @@ name = "geoalchemy2" version = "0.14.1" requires_python = ">=3.7" summary = "Using SQLAlchemy with Spatial Databases" +groups = ["default"] dependencies = [ "SQLAlchemy>=1.4", "packaging", @@ -436,6 +468,7 @@ name = "geojson" version = "3.0.1" requires_python = ">=3.7, <3.12" summary = "Python bindings and utilities for GeoJSON" +groups = ["default"] files = [ {file = "geojson-3.0.1-py3-none-any.whl", hash = "sha256:e49df982b204ed481e4c1236c57f587adf71537301cf8faf7120ab27d73c7568"}, {file = "geojson-3.0.1.tar.gz", hash = "sha256:ff3d75acab60b1e66504a11f7ea12c104bad32ff3c410a807788663b966dee4a"}, @@ -446,6 +479,7 @@ name = "gevent" version = "22.10.2" requires_python = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5" summary = "Coroutine-based network library" +groups = ["default"] dependencies = [ "cffi>=1.12.2; platform_python_implementation == \"CPython\" and sys_platform == \"win32\"", "greenlet>=2.0.0; platform_python_implementation == \"CPython\"", @@ -484,6 +518,7 @@ name = "greenlet" version = "2.0.2" requires_python = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" summary = "Lightweight in-process concurrent programming" +groups = ["default"] files = [ {file = "greenlet-2.0.2-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:30bcf80dda7f15ac77ba5af2b961bdd9dbc77fd4ac6105cee85b0d0a5fcf74df"}, {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26fbfce90728d82bc9e6c38ea4d038cba20b7faf8a0ca53a9c07b67318d46088"}, @@ -516,6 +551,7 @@ name = "gunicorn" version = "20.1.0" requires_python = ">=3.5" summary = "WSGI HTTP Server for UNIX" +groups = ["default"] dependencies = [ "setuptools>=3.0", ] @@ -530,6 +566,7 @@ version = "20.1.0" extras = ["gevent"] requires_python = ">=3.5" summary = "WSGI HTTP Server for UNIX" +groups = ["default"] dependencies = [ "gevent>=1.4.0", "gunicorn==20.1.0", @@ -544,6 +581,7 @@ name = "idna" version = "3.4" requires_python = ">=3.5" summary = "Internationalized Domain Names in Applications (IDNA)" +groups = ["default"] files = [ {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, @@ -554,7 +592,9 @@ name = "importlib-metadata" version = "6.8.0" requires_python = ">=3.8" summary = "Read metadata from Python packages" +groups = ["default"] dependencies = [ + "typing-extensions>=3.6.4; python_version < \"3.8\"", "zipp>=0.5", ] files = [ @@ -567,6 +607,7 @@ name = "iniconfig" version = "2.0.0" requires_python = ">=3.7" summary = "brain-dead simple config-ini parsing" +groups = ["test"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -577,6 +618,7 @@ name = "itsdangerous" version = "2.1.2" requires_python = ">=3.7" summary = "Safely pass data to untrusted environments and back." +groups = ["default"] files = [ {file = "itsdangerous-2.1.2-py3-none-any.whl", hash = "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44"}, {file = "itsdangerous-2.1.2.tar.gz", hash = "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"}, @@ -587,6 +629,7 @@ name = "jinja2" version = "3.1.2" requires_python = ">=3.7" summary = "A very fast and expressive template engine." +groups = ["default"] dependencies = [ "MarkupSafe>=2.0", ] @@ -600,6 +643,7 @@ name = "joblib" version = "1.2.0" requires_python = ">=3.7" summary = "Lightweight pipelining with Python functions" +groups = ["default"] files = [ {file = "joblib-1.2.0-py3-none-any.whl", hash = "sha256:091138ed78f800342968c523bdde947e7a305b8594b910a0fea2ab83c3c6d385"}, {file = "joblib-1.2.0.tar.gz", hash = "sha256:e1cee4a79e4af22881164f218d4311f60074197fb707e082e803b61f6d137018"}, @@ -610,8 +654,10 @@ name = "mako" version = "1.2.4" requires_python = ">=3.7" summary = "A super-fast templating language that borrows the best ideas from the existing templating languages." +groups = ["default"] dependencies = [ "MarkupSafe>=0.9.2", + "importlib-metadata; python_version < \"3.8\"", ] files = [ {file = "Mako-1.2.4-py3-none-any.whl", hash = "sha256:c97c79c018b9165ac9922ae4f32da095ffd3c4e6872b45eded42926deea46818"}, @@ -623,6 +669,7 @@ name = "markdown" version = "3.4.4" requires_python = ">=3.7" summary = "Python implementation of John Gruber's Markdown." +groups = ["default"] dependencies = [ "importlib-metadata>=4.4; python_version < \"3.10\"", ] @@ -636,6 +683,7 @@ name = "markupsafe" version = "2.1.2" requires_python = ">=3.7" summary = "Safely add untrusted strings to HTML/XML markup." +groups = ["default"] files = [ {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7"}, {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036"}, @@ -675,6 +723,7 @@ name = "mccabe" version = "0.7.0" requires_python = ">=3.6" summary = "McCabe checker, plugin for flake8" +groups = ["lint"] files = [ {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, @@ -685,6 +734,7 @@ name = "mypy-extensions" version = "1.0.0" requires_python = ">=3.5" summary = "Type system extensions for programs checked with the mypy type checker." +groups = ["lint"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -695,6 +745,7 @@ name = "newrelic" version = "8.8.0" requires_python = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" summary = "New Relic Python Agent" +groups = ["default"] files = [ {file = "newrelic-8.8.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6b4db0e7544232d4e6e835a02ee28637970576f8dce82ffcaa3d675246e822d5"}, {file = "newrelic-8.8.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9355f209ba8d82fd0f9d78d7cc1d9bef0ae4677b3cfed7b7aaec521adbe87559"}, @@ -710,6 +761,7 @@ name = "numpy" version = "1.24.3" requires_python = ">=3.8" summary = "Fundamental package for array computing in Python" +groups = ["default"] files = [ {file = "numpy-1.24.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3c1104d3c036fb81ab923f507536daedc718d0ad5a8707c6061cdfd6d184e570"}, {file = "numpy-1.24.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:202de8f38fc4a45a3eea4b63e2f376e5f2dc64ef0fa692838e31a808520efaf7"}, @@ -740,6 +792,7 @@ name = "oauthlib" version = "3.2.2" requires_python = ">=3.6" summary = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic" +groups = ["default"] files = [ {file = "oauthlib-3.2.2-py3-none-any.whl", hash = "sha256:8139f29aac13e25d502680e9e19963e83f16838d48a0d71c287fe40e7067fbca"}, {file = "oauthlib-3.2.2.tar.gz", hash = "sha256:9859c40929662bec5d64f34d01c99e093149682a3f38915dc0655d5a633dd918"}, @@ -750,6 +803,7 @@ name = "packaging" version = "23.1" requires_python = ">=3.7" summary = "Core utilities for Python packages" +groups = ["default", "lint", "test"] files = [ {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, @@ -760,6 +814,7 @@ name = "pandas" version = "2.0.2" requires_python = ">=3.8" summary = "Powerful data structures for data analysis, time series, and statistics" +groups = ["default"] dependencies = [ "numpy>=1.20.3; python_version < \"3.10\"", "numpy>=1.21.0; python_version >= \"3.10\"", @@ -795,6 +850,7 @@ name = "pathspec" version = "0.11.1" requires_python = ">=3.7" summary = "Utility library for gitignore style pattern matching of file paths." +groups = ["lint"] files = [ {file = "pathspec-0.11.1-py3-none-any.whl", hash = "sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293"}, {file = "pathspec-0.11.1.tar.gz", hash = "sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687"}, @@ -805,6 +861,10 @@ name = "platformdirs" version = "3.5.1" requires_python = ">=3.7" summary = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +groups = ["lint"] +dependencies = [ + "typing-extensions>=4.5; python_version < \"3.8\"", +] files = [ {file = "platformdirs-3.5.1-py3-none-any.whl", hash = "sha256:e2378146f1964972c03c085bb5662ae80b2b8c06226c54b2ff4aa9483e8a13a5"}, {file = "platformdirs-3.5.1.tar.gz", hash = "sha256:412dae91f52a6f84830f39a8078cecd0e866cb72294a5c66808e74d5e88d251f"}, @@ -815,6 +875,10 @@ name = "pluggy" version = "1.0.0" requires_python = ">=3.6" summary = "plugin and hook calling mechanisms for python" +groups = ["test"] +dependencies = [ + "importlib-metadata>=0.12; python_version < \"3.8\"", +] files = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, @@ -825,6 +889,7 @@ name = "psycopg2" version = "2.9.6" requires_python = ">=3.6" summary = "psycopg2 - Python-PostgreSQL Database Adapter" +groups = ["default"] files = [ {file = "psycopg2-2.9.6-cp310-cp310-win32.whl", hash = "sha256:f7a7a5ee78ba7dc74265ba69e010ae89dae635eea0e97b055fb641a01a31d2b1"}, {file = "psycopg2-2.9.6-cp310-cp310-win_amd64.whl", hash = "sha256:f75001a1cbbe523e00b0ef896a5a1ada2da93ccd752b7636db5a99bc57c44494"}, @@ -840,6 +905,7 @@ name = "psycopg2-binary" version = "2.9.6" requires_python = ">=3.6" summary = "psycopg2 - Python-PostgreSQL Database Adapter" +groups = ["dev"] files = [ {file = "psycopg2-binary-2.9.6.tar.gz", hash = "sha256:1f64dcfb8f6e0c014c7f55e51c9759f024f70ea572fbdef123f85318c297947c"}, {file = "psycopg2_binary-2.9.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d26e0342183c762de3276cca7a530d574d4e25121ca7d6e4a98e4f05cb8e4df7"}, @@ -885,6 +951,7 @@ name = "pycodestyle" version = "2.11.0" requires_python = ">=3.8" summary = "Python style guide checker" +groups = ["lint"] files = [ {file = "pycodestyle-2.11.0-py2.py3-none-any.whl", hash = "sha256:5d1013ba8dc7895b548be5afb05740ca82454fd899971563d2ef625d090326f8"}, {file = "pycodestyle-2.11.0.tar.gz", hash = "sha256:259bcc17857d8a8b3b4a2327324b79e5f020a13c16074670f9c8c8f872ea76d0"}, @@ -895,6 +962,8 @@ name = "pycparser" version = "2.21" requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" summary = "C parser in Python" +groups = ["default"] +marker = "platform_python_implementation == \"CPython\" and sys_platform == \"win32\"" files = [ {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, @@ -905,6 +974,7 @@ name = "pyflakes" version = "3.1.0" requires_python = ">=3.8" summary = "passive checker of Python programs" +groups = ["lint"] files = [ {file = "pyflakes-3.1.0-py2.py3-none-any.whl", hash = "sha256:4132f6d49cb4dae6819e5379898f2b8cce3c5f23994194c24b77d5da2e36f774"}, {file = "pyflakes-3.1.0.tar.gz", hash = "sha256:a0aae034c444db0071aa077972ba4768d40c830d9539fd45bf4cd3f8f6992efc"}, @@ -915,9 +985,11 @@ name = "pytest" version = "7.4.0" requires_python = ">=3.7" summary = "pytest: simple powerful testing with Python" +groups = ["test"] dependencies = [ "colorama; sys_platform == \"win32\"", "exceptiongroup>=1.0.0rc8; python_version < \"3.11\"", + "importlib-metadata>=0.12; python_version < \"3.8\"", "iniconfig", "packaging", "pluggy<2.0,>=0.12", @@ -933,6 +1005,7 @@ name = "python-dateutil" version = "2.8.2" requires_python = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" summary = "Extensions to the standard Python datetime module" +groups = ["default"] dependencies = [ "six>=1.5", ] @@ -946,6 +1019,7 @@ name = "python-dotenv" version = "1.0.0" requires_python = ">=3.8" summary = "Read key-value pairs from a .env file and set them as environment variables" +groups = ["default"] files = [ {file = "python-dotenv-1.0.0.tar.gz", hash = "sha256:a8df96034aae6d2d50a4ebe8216326c61c3eb64836776504fcca410e5937a3ba"}, {file = "python_dotenv-1.0.0-py3-none-any.whl", hash = "sha256:f5971a9226b701070a4bf2c38c89e5a3f0d64de8debda981d1db98583009122a"}, @@ -956,6 +1030,7 @@ name = "python-slugify" version = "8.0.1" requires_python = ">=3.7" summary = "A Python slugify application that also handles Unicode" +groups = ["default"] dependencies = [ "text-unidecode>=1.3", ] @@ -968,6 +1043,7 @@ files = [ name = "pytz" version = "2023.3" summary = "World timezone definitions, modern and historical" +groups = ["default"] files = [ {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, @@ -978,6 +1054,7 @@ name = "pyyaml" version = "6.0.1" requires_python = ">=3.6" summary = "YAML parser and emitter for Python" +groups = ["default"] files = [ {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, @@ -1001,6 +1078,7 @@ name = "requests" version = "2.31.0" requires_python = ">=3.7" summary = "Python HTTP for Humans." +groups = ["default"] dependencies = [ "certifi>=2017.4.17", "charset-normalizer<4,>=2", @@ -1017,6 +1095,7 @@ name = "requests-oauthlib" version = "1.3.1" requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" summary = "OAuthlib authentication support for Requests." +groups = ["default"] dependencies = [ "oauthlib>=3.0.0", "requests>=2.0.0", @@ -1030,6 +1109,7 @@ files = [ name = "schematics" version = "2.1.1" summary = "Python Data Structures for Humans" +groups = ["default"] files = [ {file = "schematics-2.1.1-py2.py3-none-any.whl", hash = "sha256:be2d451bfb86789975e5ec0864aec569b63cea9010f0d24cbbd992a4e564c647"}, {file = "schematics-2.1.1.tar.gz", hash = "sha256:34c87f51a25063bb498ae1cc201891b134cfcb329baf9e9f4f3ae869b767560f"}, @@ -1040,6 +1120,7 @@ name = "scikit-learn" version = "1.2.2" requires_python = ">=3.8" summary = "A set of python modules for machine learning and data mining" +groups = ["default"] dependencies = [ "joblib>=1.1.1", "numpy>=1.17.3", @@ -1070,6 +1151,7 @@ name = "scipy" version = "1.10.1" requires_python = "<3.12,>=3.8" summary = "Fundamental algorithms for scientific computing in Python" +groups = ["default"] dependencies = [ "numpy<1.27.0,>=1.19.5", ] @@ -1096,9 +1178,12 @@ files = [ name = "sentry-sdk" version = "1.26.0" summary = "Python client for Sentry (https://sentry.io)" +groups = ["default"] dependencies = [ "certifi", + "urllib3>=1.25.7; python_version <= \"3.4\"", "urllib3>=1.26.11; python_version >= \"3.6\"", + "urllib3>=1.26.9; python_version == \"3.5\"", ] files = [ {file = "sentry-sdk-1.26.0.tar.gz", hash = "sha256:760e4fb6d01c994110507133e08ecd4bdf4d75ee4be77f296a3579796cf73134"}, @@ -1110,6 +1195,7 @@ name = "sentry-sdk" version = "1.26.0" extras = ["flask"] summary = "Python client for Sentry (https://sentry.io)" +groups = ["default"] dependencies = [ "blinker>=1.1", "flask>=0.11", @@ -1126,6 +1212,7 @@ name = "setuptools" version = "67.7.2" requires_python = ">=3.7" summary = "Easily download, build, install, upgrade, and uninstall Python packages" +groups = ["default"] files = [ {file = "setuptools-67.7.2-py3-none-any.whl", hash = "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b"}, {file = "setuptools-67.7.2.tar.gz", hash = "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990"}, @@ -1136,6 +1223,7 @@ name = "shapely" version = "2.0.1" requires_python = ">=3.7" summary = "Manipulation and analysis of geometric objects" +groups = ["default"] dependencies = [ "numpy>=1.14", ] @@ -1171,6 +1259,7 @@ name = "six" version = "1.16.0" requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" summary = "Python 2 and 3 compatibility utilities" +groups = ["default"] files = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -1181,8 +1270,10 @@ name = "sqlalchemy" version = "2.0.19" requires_python = ">=3.7" summary = "Database Abstraction Library" +groups = ["default"] dependencies = [ - "greenlet!=0.4.17; platform_machine == \"aarch64\" or (platform_machine == \"ppc64le\" or (platform_machine == \"x86_64\" or (platform_machine == \"amd64\" or (platform_machine == \"AMD64\" or (platform_machine == \"win32\" or platform_machine == \"WIN32\")))))", + "greenlet!=0.4.17; platform_machine == \"win32\" or platform_machine == \"WIN32\" or platform_machine == \"AMD64\" or platform_machine == \"amd64\" or platform_machine == \"x86_64\" or platform_machine == \"ppc64le\" or platform_machine == \"aarch64\"", + "importlib-metadata; python_version < \"3.8\"", "typing-extensions>=4.2.0", ] files = [ @@ -1210,6 +1301,7 @@ files = [ name = "text-unidecode" version = "1.3" summary = "The most basic Text::Unidecode port" +groups = ["default"] files = [ {file = "text-unidecode-1.3.tar.gz", hash = "sha256:bad6603bb14d279193107714b288be206cac565dfa49aa5b105294dd5c4aab93"}, {file = "text_unidecode-1.3-py2.py3-none-any.whl", hash = "sha256:1311f10e8b895935241623731c2ba64f4c455287888b18189350b67134a822e8"}, @@ -1220,6 +1312,7 @@ name = "threadpoolctl" version = "3.1.0" requires_python = ">=3.6" summary = "threadpoolctl" +groups = ["default"] files = [ {file = "threadpoolctl-3.1.0-py3-none-any.whl", hash = "sha256:8b99adda265feb6773280df41eece7b2e6561b772d21ffd52e372f999024907b"}, {file = "threadpoolctl-3.1.0.tar.gz", hash = "sha256:a335baacfaa4400ae1f0d8e3a58d6674d2f8828e3716bb2802c44955ad391380"}, @@ -1230,6 +1323,8 @@ name = "tomli" version = "2.0.1" requires_python = ">=3.7" summary = "A lil' TOML parser" +groups = ["lint", "test"] +marker = "python_version < \"3.11\"" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -1240,6 +1335,7 @@ name = "typing-extensions" version = "4.5.0" requires_python = ">=3.7" summary = "Backported and Experimental Type Hints for Python 3.7+" +groups = ["default", "lint"] files = [ {file = "typing_extensions-4.5.0-py3-none-any.whl", hash = "sha256:fb33085c39dd998ac16d1431ebc293a8b3eedd00fd4a32de0ff79002c19511b4"}, {file = "typing_extensions-4.5.0.tar.gz", hash = "sha256:5cb5f4a79139d699607b3ef622a1dedafa84e115ab0024e0d9c044a9479ca7cb"}, @@ -1250,6 +1346,7 @@ name = "tzdata" version = "2023.3" requires_python = ">=2" summary = "Provider of IANA time zone data" +groups = ["default"] files = [ {file = "tzdata-2023.3-py2.py3-none-any.whl", hash = "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda"}, {file = "tzdata-2023.3.tar.gz", hash = "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a"}, @@ -1260,7 +1357,9 @@ name = "tzlocal" version = "5.0.1" requires_python = ">=3.7" summary = "tzinfo object for the local timezone" +groups = ["default"] dependencies = [ + "backports-zoneinfo; python_version < \"3.9\"", "tzdata; platform_system == \"Windows\"", ] files = [ @@ -1273,6 +1372,7 @@ name = "urllib3" version = "1.26.15" requires_python = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" summary = "HTTP library with thread-safe connection pooling, file post, and more." +groups = ["default"] files = [ {file = "urllib3-1.26.15-py2.py3-none-any.whl", hash = "sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42"}, {file = "urllib3-1.26.15.tar.gz", hash = "sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305"}, @@ -1282,6 +1382,7 @@ files = [ name = "webencodings" version = "0.5.1" summary = "Character encoding aliases for legacy web content" +groups = ["default"] files = [ {file = "webencodings-0.5.1-py2.py3-none-any.whl", hash = "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78"}, {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, @@ -1292,6 +1393,7 @@ name = "werkzeug" version = "2.3.6" requires_python = ">=3.8" summary = "The comprehensive WSGI web application library." +groups = ["default"] dependencies = [ "MarkupSafe>=2.1.1", ] @@ -1305,6 +1407,7 @@ name = "zipp" version = "3.16.2" requires_python = ">=3.8" summary = "Backport of pathlib-compatible object wrapper for zip files" +groups = ["default"] files = [ {file = "zipp-3.16.2-py3-none-any.whl", hash = "sha256:679e51dd4403591b2d6838a48de3d283f3d188412a9782faadf845f298736ba0"}, {file = "zipp-3.16.2.tar.gz", hash = "sha256:ebc15946aa78bd63458992fc81ec3b6f7b1e92d51c35e6de1c3804e73b799147"}, @@ -1314,6 +1417,7 @@ files = [ name = "zope-event" version = "4.6" summary = "Very basic event publishing system" +groups = ["default"] dependencies = [ "setuptools", ] @@ -1327,6 +1431,7 @@ name = "zope-interface" version = "6.0" requires_python = ">=3.7" summary = "Interfaces for Python" +groups = ["default"] dependencies = [ "setuptools", ] From 42eb81767e4281ce454251a16b970ce78ef8deb4 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 4 Sep 2024 23:19:01 +0100 Subject: [PATCH 4/5] build: dockerfile package installs alphabetical (sonarcloud) --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4514086ec7..e45726073b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,10 +36,10 @@ WORKDIR /opt/python # Setup backend build-time dependencies RUN apt-get update && apt-get install --no-install-recommends -y \ build-essential \ - postgresql-server-dev-15 \ - python3-dev \ libffi-dev \ - libgeos-dev + libgeos-dev \ + postgresql-server-dev-15 \ + python3-dev # Setup backend Python dependencies COPY --from=extract-deps \ /opt/python/requirements.txt /opt/python/ @@ -62,7 +62,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ # Setup backend runtime dependencies RUN apt-get update && \ apt-get install --no-install-recommends -y \ - postgresql-client libgeos3.11.1 proj-bin && \ + libgeos3.11.1 postgresql-client proj-bin && \ apt-get clean && rm -rf /var/lib/apt/lists/* COPY --from=build \ /home/appuser/.local \ From f54d760b7cc15872ed7d4bcd6378ca0904348581 Mon Sep 17 00:00:00 2001 From: spwoodcock Date: Wed, 4 Sep 2024 23:29:39 +0100 Subject: [PATCH 5/5] build: tweak backend dockerfile for sonarcloud linting fixes --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index e45726073b..74539ee476 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ ARG DEBIAN_IMG_TAG=slim-bookworm ARG PYTHON_IMG_TAG=3.10 + + FROM docker.io/python:${PYTHON_IMG_TAG}-${DEBIAN_IMG_TAG} as base ARG APP_VERSION=0.1.0 ARG DOCKERFILE_VERSION=0.5.0 ARG ALPINE_IMG_TAG +ARG DEBIAN_IMG_TAG ARG PYTHON_IMG_TAG ARG MAINTAINER=sysadmin@hotosm.org LABEL org.hotosm.tasks.app-version="${APP_VERSION}" \ @@ -39,7 +42,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ libffi-dev \ libgeos-dev \ postgresql-server-dev-15 \ - python3-dev + python3-dev \ + && rm -rf /var/lib/apt/lists/* # Setup backend Python dependencies COPY --from=extract-deps \ /opt/python/requirements.txt /opt/python/ @@ -63,7 +67,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ RUN apt-get update && \ apt-get install --no-install-recommends -y \ libgeos3.11.1 postgresql-client proj-bin && \ - apt-get clean && rm -rf /var/lib/apt/lists/* + rm -rf /var/lib/apt/lists/* COPY --from=build \ /home/appuser/.local \ /home/appuser/.local @@ -90,7 +94,6 @@ FROM runtime as prod USER root RUN apt-get update && \ apt-get install -y curl && \ - apt-get clean && \ rm -rf /var/lib/apt/lists/* # Pre-compile packages to .pyc (init speed gains) RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)"