From 2e1f0ecfc3ae5305acfdb62b35967c84d88fba38 Mon Sep 17 00:00:00 2001 From: Pedro Crespo-Valero <32402063+pcrespov@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:44:52 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=E2=99=BB=EF=B8=8F=20Upgrades?= =?UTF-8?q?=20pint=20library=20as=20well=20as=20Dockerfile=20syntax=20to?= =?UTF-8?q?=20address=20deprecation=20or=20syntax=20warnings=20(#6521)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 26 ++++++++++------- packages/aws-library/requirements/_base.txt | 2 +- packages/postgres-database/docker/Dockerfile | 6 ++-- .../postgres-database/scripts/erd/Dockerfile | 2 +- packages/service-integration/Dockerfile | 8 ++--- .../service-library/requirements/_base.txt | 2 +- packages/simcore-sdk/requirements/_base.txt | 2 +- requirements/tools/Dockerfile | 2 +- scripts/apt-packages-versions/Dockerfile | 2 +- scripts/common.Makefile | 8 ++--- scripts/erd/Dockerfile | 2 +- scripts/pydeps-docker/Dockerfile | 2 +- services/agent/Dockerfile | 10 +++---- services/agent/requirements/_base.txt | 2 +- services/api-server/Dockerfile | 10 +++---- services/api-server/requirements/_base.txt | 10 ++++++- services/autoscaling/Dockerfile | 10 +++---- services/catalog/Dockerfile | 10 +++---- services/clusters-keeper/Dockerfile | 10 +++---- services/dask-sidecar/Dockerfile | 10 +++---- services/datcore-adapter/Dockerfile | 10 +++---- services/director-v2/Dockerfile | 10 +++---- services/director-v2/requirements/_base.txt | 10 ++++++- services/director/Dockerfile | 10 +++---- services/director/requirements/_base.txt | 12 ++------ services/director/requirements/_tools.txt | 29 +++---------------- services/director/requirements/ci.txt | 1 - services/dynamic-scheduler/Dockerfile | 10 +++---- services/dynamic-sidecar/Dockerfile | 10 +++---- .../dynamic-sidecar/requirements/_base.txt | 10 ++++++- services/efs-guardian/Dockerfile | 10 +++---- services/invitations/Dockerfile | 10 +++---- services/migration/Dockerfile | 6 ++-- services/osparc-gateway-server/Dockerfile | 10 +++---- services/payments/Dockerfile | 10 +++---- services/payments/requirements/_base.txt | 2 +- services/resource-usage-tracker/Dockerfile | 10 +++---- .../tools/qooxdoo-kit/builder/Dockerfile | 10 +++---- services/storage/Dockerfile | 10 +++---- services/web/Dockerfile | 10 +++---- services/web/server/requirements/_base.txt | 11 ++++++- .../catalog/_models.py | 3 +- .../integration/01/test_garbage_collection.py | 28 ++++++++++++------ tests/e2e/docker/Dockerfile | 2 +- tests/swarm-deploy/requirements/_test.txt | 2 +- tests/swarm-deploy/test_service_images.py | 2 +- 46 files changed, 198 insertions(+), 186 deletions(-) diff --git a/Makefile b/Makefile index 038d7b70b1d..0c7ee08f86a 100644 --- a/Makefile +++ b/Makefile @@ -685,9 +685,9 @@ info-registry: ## info on local registry (if any) ## INFO ------------------------------- -.PHONY: info info-images info-swarm info-tools +.PHONY: info info-images info-swarm info: ## displays setup information - # setup info: + @echo setup info -------------------------------- @echo ' Detected OS : $(IS_LINUX)$(IS_OSX)$(IS_WSL)$(IS_WSL2)$(IS_WIN)' @echo ' SWARM_STACK_NAME : ${SWARM_STACK_NAME}' @echo ' DOCKER_REGISTRY : $(DOCKER_REGISTRY)' @@ -697,19 +697,23 @@ info: ## displays setup information @echo ' - ULR : ${VCS_URL}' @echo ' - REF : ${VCS_REF}' @echo ' - (STATUS)REF_CLIENT : (${VCS_STATUS_CLIENT}) ${VCS_REF_CLIENT}' - @echo ' DIRECTOR_API_VERSION : ${DIRECTOR_API_VERSION}' - @echo ' STORAGE_API_VERSION : ${STORAGE_API_VERSION}' - @echo ' DATCORE_ADAPTER_API_VERSION : ${DATCORE_ADAPTER_API_VERSION}' - @echo ' WEBSERVER_API_VERSION : ${WEBSERVER_API_VERSION}' - # dev tools version - @echo ' make : $(shell make --version 2>&1 | head -n 1)' - @echo ' jq : $(shell jq --version)' + @make --silent info-tools + + +.PHONY: show-tools +info-tools: ## displays tools versions + @echo dev-tools versions ------------------------- @echo ' awk : $(shell awk -W version 2>&1 | head -n 1)' - @echo ' python : $(shell python3 --version)' - @echo ' node : $(shell node --version 2> /dev/null || echo ERROR nodejs missing)' @echo ' docker : $(shell docker --version)' @echo ' docker buildx : $(shell docker buildx version)' @echo ' docker compose: $(shell docker compose version)' + @echo ' jq : $(shell jq --version)' + @echo ' make : $(shell make --version 2>&1 | head -n 1)' + @echo ' node : $(shell node --version 2> /dev/null || echo ERROR nodejs missing)' + @echo ' python : $(shell python3 --version)' + @echo ' uv : $(shell uv --version 2> /dev/null || echo ERROR uv missing)' + @echo ' ubuntu : $(shell lsb_release --description --short 2> /dev/null | tail || echo ERROR Not an Ubuntu OS )' + define show-meta diff --git a/packages/aws-library/requirements/_base.txt b/packages/aws-library/requirements/_base.txt index e3ba613b1af..01e0157d934 100644 --- a/packages/aws-library/requirements/_base.txt +++ b/packages/aws-library/requirements/_base.txt @@ -210,7 +210,7 @@ pyyaml==6.0.2 # -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../requirements/constraints.txt # -r requirements/../../../packages/service-library/requirements/_base.in -redis==5.0.8 +redis==5.0.4 # via # -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../packages/service-library/requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt diff --git a/packages/postgres-database/docker/Dockerfile b/packages/postgres-database/docker/Dockerfile index c310ad5c53f..7c3e74870b2 100644 --- a/packages/postgres-database/docker/Dockerfile +++ b/packages/postgres-database/docker/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1 -FROM python:3.6-slim as base +FROM python:3.6-slim AS base LABEL maintainer=sanderegg @@ -13,7 +13,7 @@ ENV PYTHONDONTWRITEBYTECODE=1 \ ENV PATH="${VIRTUAL_ENV}/bin:$PATH" -FROM base as build +FROM base AS build RUN apt-get update \ && apt-get install -y --no-install-recommends \ @@ -41,7 +41,7 @@ ARG GIT_REPOSITORY RUN git clone --single-branch --branch ${GIT_BRANCH} ${GIT_REPOSITORY} osparc-simcore\ && uv pip install osparc-simcore/packages/postgres-database[migration] -FROM base as production +FROM base AS production ENV PYTHONOPTIMIZE=TRUE diff --git a/packages/postgres-database/scripts/erd/Dockerfile b/packages/postgres-database/scripts/erd/Dockerfile index fae33a3af00..e18bec73e16 100644 --- a/packages/postgres-database/scripts/erd/Dockerfile +++ b/packages/postgres-database/scripts/erd/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base RUN apt-get update \ && apt-get -y install --no-install-recommends\ diff --git a/packages/service-integration/Dockerfile b/packages/service-integration/Dockerfile index 25069fdebbe..15c1de6cc24 100644 --- a/packages/service-integration/Dockerfile +++ b/packages/service-integration/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base LABEL maintainer=pcrespov @@ -46,7 +46,7 @@ ENV PATH="${VIRTUAL_ENV}/bin:$PATH" # -------------------------- Build stage ------------------- -FROM base as build +FROM base AS build RUN --mount=type=cache,target=/var/cache/apt,mode=0755,sharing=private \ --mount=type=cache,target=/var/lib/apt,mode=0755,sharing=private \ @@ -82,9 +82,9 @@ RUN \ # -------------------------- Build stage ------------------- -FROM base as development +FROM base AS development # NOTE: this is necessary to allow to build development images but is the same as production here -FROM base as production +FROM base AS production ENV PYTHONOPTIMIZE=TRUE diff --git a/packages/service-library/requirements/_base.txt b/packages/service-library/requirements/_base.txt index 1ca02bd5938..bee8270701b 100644 --- a/packages/service-library/requirements/_base.txt +++ b/packages/service-library/requirements/_base.txt @@ -161,7 +161,7 @@ pyyaml==6.0.2 # -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../requirements/constraints.txt # -r requirements/_base.in -redis==5.0.8 +redis==5.0.4 # via # -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt diff --git a/packages/simcore-sdk/requirements/_base.txt b/packages/simcore-sdk/requirements/_base.txt index b57f881bbc4..26a197a8fa9 100644 --- a/packages/simcore-sdk/requirements/_base.txt +++ b/packages/simcore-sdk/requirements/_base.txt @@ -232,7 +232,7 @@ pyyaml==6.0.2 # -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../requirements/constraints.txt # -r requirements/../../../packages/service-library/requirements/_base.in -redis==5.0.8 +redis==5.0.4 # via # -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../packages/postgres-database/requirements/../../../requirements/constraints.txt diff --git a/requirements/tools/Dockerfile b/requirements/tools/Dockerfile index 65d6faa3cad..e6af4395ed6 100644 --- a/requirements/tools/Dockerfile +++ b/requirements/tools/Dockerfile @@ -9,7 +9,7 @@ # # ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base ENV VIRTUAL_ENV=/home/scu/.venv diff --git a/scripts/apt-packages-versions/Dockerfile b/scripts/apt-packages-versions/Dockerfile index 5992008917c..02708317fe1 100644 --- a/scripts/apt-packages-versions/Dockerfile +++ b/scripts/apt-packages-versions/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base RUN \ apt-get update && \ diff --git a/scripts/common.Makefile b/scripts/common.Makefile index 539eb1bf22f..abbe2a1d6cf 100644 --- a/scripts/common.Makefile +++ b/scripts/common.Makefile @@ -98,6 +98,8 @@ clean: ## cleans all unversioned files in project and temp files create by this @git clean $(_GIT_CLEAN_ARGS) + + .PHONY: info inf%: ## displays basic info # system @@ -106,12 +108,6 @@ inf%: ## displays basic info @echo ' NOW_TIMESTAMP : ${NOW_TIMESTAMP}' @echo ' VCS_URL : ${VCS_URL}' @echo ' VCS_REF : ${VCS_REF}' - # dev tools version - @echo ' make : $(shell make --version 2>&1 | head -n 1)' - @echo ' jq : $(shell jq --version)' - @echo ' awk : $(shell awk -W version 2>&1 | head -n 1)' - @echo ' node : $(shell node --version 2> /dev/null || echo ERROR nodejs missing)' - @echo ' python : $(shell python3 --version)' # installed in .venv @uv pip list # package setup diff --git a/scripts/erd/Dockerfile b/scripts/erd/Dockerfile index ce98f367944..9294fa23e1d 100644 --- a/scripts/erd/Dockerfile +++ b/scripts/erd/Dockerfile @@ -8,7 +8,7 @@ # ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base RUN apt-get update \ && apt-get -y install --no-install-recommends\ diff --git a/scripts/pydeps-docker/Dockerfile b/scripts/pydeps-docker/Dockerfile index ed647427913..610fe9aa6f0 100644 --- a/scripts/pydeps-docker/Dockerfile +++ b/scripts/pydeps-docker/Dockerfile @@ -9,7 +9,7 @@ # # ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base RUN apt-get update \ diff --git a/services/agent/Dockerfile b/services/agent/Dockerfile index fdff90cc5f3..fe6fef17c35 100644 --- a/services/agent/Dockerfile +++ b/services/agent/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -62,7 +62,7 @@ RUN \ # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -104,7 +104,7 @@ RUN \ # + /build # + services/agent [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -126,7 +126,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/agent [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -166,7 +166,7 @@ CMD ["/bin/sh", "services/agent/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/agent diff --git a/services/agent/requirements/_base.txt b/services/agent/requirements/_base.txt index 2da1d9c2e70..9fbcc0838ab 100644 --- a/services/agent/requirements/_base.txt +++ b/services/agent/requirements/_base.txt @@ -244,7 +244,7 @@ pyyaml==6.0.2 # -c requirements/../../../packages/settings-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../requirements/constraints.txt # -r requirements/../../../packages/service-library/requirements/_base.in -redis==5.0.8 +redis==5.0.4 # via # -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../packages/service-library/requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt diff --git a/services/api-server/Dockerfile b/services/api-server/Dockerfile index 597f421ab4d..ced7167fe5c 100644 --- a/services/api-server/Dockerfile +++ b/services/api-server/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: # cd sercices/api-server @@ -58,7 +58,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -100,7 +100,7 @@ RUN \ # + /build # + services/api-server [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/api-server [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -160,7 +160,7 @@ CMD ["/bin/sh", "services/api-server/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development diff --git a/services/api-server/requirements/_base.txt b/services/api-server/requirements/_base.txt index 76bdd46ba36..85f9e349ade 100644 --- a/services/api-server/requirements/_base.txt +++ b/services/api-server/requirements/_base.txt @@ -58,6 +58,8 @@ anyio==4.3.0 # httpx # starlette # watchfiles +appdirs==1.4.4 + # via pint arrow==1.3.0 # via # -r requirements/../../../packages/models-library/requirements/_base.in @@ -164,6 +166,10 @@ faststream==0.5.10 # via # -r requirements/../../../packages/service-library/requirements/_base.in # -r requirements/../../../packages/simcore-sdk/requirements/../../../packages/service-library/requirements/_base.in +flexcache==0.3 + # via pint +flexparser==0.3.1 + # via pint frozenlist==1.4.1 # via # aiohttp @@ -356,7 +362,7 @@ pamqp==3.3.0 # via aiormq parse==1.20.2 # via -r requirements/_base.in -pint==0.23 +pint==0.24.3 # via -r requirements/../../../packages/simcore-sdk/requirements/_base.in prometheus-client==0.20.0 # via @@ -564,6 +570,8 @@ typing-extensions==4.10.0 # fastapi # fastapi-pagination # faststream + # flexcache + # flexparser # opentelemetry-sdk # pint # pydantic diff --git a/services/autoscaling/Dockerfile b/services/autoscaling/Dockerfile index a4d50b497c9..1821d873057 100644 --- a/services/autoscaling/Dockerfile +++ b/services/autoscaling/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -78,7 +78,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -120,7 +120,7 @@ RUN \ # + /build # + services/autoscaling [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -142,7 +142,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/autoscaling [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -179,7 +179,7 @@ CMD ["/bin/sh", "services/autoscaling/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/autoscaling diff --git a/services/catalog/Dockerfile b/services/catalog/Dockerfile index b87d90b1224..c4f48d2ec08 100644 --- a/services/catalog/Dockerfile +++ b/services/catalog/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # # USAGE: @@ -59,7 +59,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -101,7 +101,7 @@ RUN \ # + /build # + services/catalog [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/catalog [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -159,7 +159,7 @@ CMD ["/bin/sh", "services/catalog/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development diff --git a/services/clusters-keeper/Dockerfile b/services/clusters-keeper/Dockerfile index cd29d763adf..2dd08b4b44b 100644 --- a/services/clusters-keeper/Dockerfile +++ b/services/clusters-keeper/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -78,7 +78,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -120,7 +120,7 @@ RUN \ # + /build # + services/clusters-keeper [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -142,7 +142,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/clusters-keeper [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -179,7 +179,7 @@ CMD ["/bin/sh", "services/clusters-keeper/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/clusters-keeper diff --git a/services/dask-sidecar/Dockerfile b/services/dask-sidecar/Dockerfile index b91cefa9e88..a85f653f5cc 100644 --- a/services/dask-sidecar/Dockerfile +++ b/services/dask-sidecar/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM --platform=${TARGETPLATFORM} python:${PYTHON_VERSION}-slim-bookworm as base +FROM --platform=${TARGETPLATFORM} python:${PYTHON_VERSION}-slim-bookworm AS base ARG TARGETPLATFORM ARG BUILDPLATFORM RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log @@ -69,7 +69,7 @@ RUN mkdir --parents /home/scu/.config/dask \ # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -108,7 +108,7 @@ RUN \ # + /build # + services/dask-sidecar [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET=prod-only-deps @@ -129,7 +129,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/dask-sidecar [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -169,7 +169,7 @@ CMD ["/bin/sh", "services/dask-sidecar/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development diff --git a/services/datcore-adapter/Dockerfile b/services/datcore-adapter/Dockerfile index af314327054..bdd52d81841 100644 --- a/services/datcore-adapter/Dockerfile +++ b/services/datcore-adapter/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -59,7 +59,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -101,7 +101,7 @@ RUN \ # + /build # + services/datcore-adapter [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/datcore-adapter [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -160,7 +160,7 @@ CMD ["/bin/sh", "services/datcore-adapter/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/datcore-adapter diff --git a/services/director-v2/Dockerfile b/services/director-v2/Dockerfile index 4e29e4a3d2f..4780eb62e33 100644 --- a/services/director-v2/Dockerfile +++ b/services/director-v2/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -59,7 +59,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -101,7 +101,7 @@ RUN \ # + /build # + services/director-v2 [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/director-v2 [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -160,7 +160,7 @@ CMD ["/bin/sh", "services/director-v2/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/director-v2 diff --git a/services/director-v2/requirements/_base.txt b/services/director-v2/requirements/_base.txt index a151f9fb0ab..7a524e68619 100644 --- a/services/director-v2/requirements/_base.txt +++ b/services/director-v2/requirements/_base.txt @@ -64,6 +64,8 @@ anyio==4.3.0 # httpx # starlette # watchfiles +appdirs==1.4.4 + # via pint arrow==1.3.0 # via # -r requirements/../../../packages/dask-task-models-library/requirements/../../../packages/models-library/requirements/_base.in @@ -180,6 +182,10 @@ faststream==0.5.10 # via # -r requirements/../../../packages/service-library/requirements/_base.in # -r requirements/../../../packages/simcore-sdk/requirements/../../../packages/service-library/requirements/_base.in +flexcache==0.3 + # via pint +flexparser==0.3.1 + # via pint frozenlist==1.4.1 # via # aiohttp @@ -420,7 +426,7 @@ partd==1.4.2 # via # -r requirements/../../../services/dask-sidecar/requirements/_dask-distributed.txt # dask -pint==0.23 +pint==0.24.3 # via -r requirements/../../../packages/simcore-sdk/requirements/_base.in prometheus-client==0.20.0 # via @@ -678,6 +684,8 @@ typing-extensions==4.11.0 # alembic # fastapi # faststream + # flexcache + # flexparser # opentelemetry-sdk # pint # pydantic diff --git a/services/director/Dockerfile b/services/director/Dockerfile index fbd6bf4b0c6..3449ba3db80 100644 --- a/services/director/Dockerfile +++ b/services/director/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.6.10" -FROM python:${PYTHON_VERSION}-slim-buster as base +FROM python:${PYTHON_VERSION}-slim-buster AS base # # USAGE: # cd sercices/director @@ -67,7 +67,7 @@ EXPOSE 8080 # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -108,7 +108,7 @@ COPY --chown=scu:scu api/specs/director/schemas/node-meta-v0.0.1.json \ # + /build # + services/director [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps WORKDIR /build/services/director ENV SC_BUILD_TARGET=prod-only-deps @@ -124,7 +124,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/director [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -157,7 +157,7 @@ CMD ["services/director/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development ENV NODE_SCHEMA_LOCATION=../../../api/specs/director/schemas/node-meta-v0.0.1.json diff --git a/services/director/requirements/_base.txt b/services/director/requirements/_base.txt index d8280bd4673..2c6e016526f 100644 --- a/services/director/requirements/_base.txt +++ b/services/director/requirements/_base.txt @@ -1,9 +1,3 @@ -# -# This file is autogenerated by pip-compile with python 3.6 -# To update, run: -# -# pip-compile --output-file=requirements/_base.txt --strip-extras requirements/_base.in -# aiodebug==1.1.2 # via # -r requirements/_base.in @@ -54,9 +48,7 @@ chardet==3.0.4 charset-normalizer==2.0.12 # via requests dataclasses==0.7 - # via - # -r requirements/_base.in - # pydantic + # via -r requirements/_base.in idna==2.8 # via # -r requirements/_base.in @@ -116,7 +108,7 @@ pyyaml==5.4 # simcore-service-library requests==2.27.1 # via -r requirements/_base.in -simcore-service-library @ git+https://github.com/ITISFoundation/osparc-simcore.git@c8669fb52659b684514fefa4f3b4599f57f276a0#subdirectory=packages/service-library +simcore-service-library @ git+https://github.com/ITISFoundation/osparc-simcore.git@c8669fb52659b684514fefa4f3b4599f57f276a0#egg=simcore-service-library&subdirectory=packages/service-library # via -r requirements/_base.in six==1.12.0 # via diff --git a/services/director/requirements/_tools.txt b/services/director/requirements/_tools.txt index 38ed7220aed..4c0c50f666d 100644 --- a/services/director/requirements/_tools.txt +++ b/services/director/requirements/_tools.txt @@ -1,9 +1,3 @@ -# -# This file is autogenerated by pip-compile with python 3.6 -# To update, run: -# -# pip-compile --output-file=requirements/_tools.txt --strip-extras requirements/_tools.in -# appdirs==1.4.4 # via black black==20.8b1 @@ -14,22 +8,14 @@ click==8.0.3 # via # black # pip-tools -dataclasses==0.7 - # via - # -c requirements/_base.txt - # -c requirements/_test.txt - # black -importlib-metadata==2.0.0 - # via - # -c requirements/_test.txt - # click - # pep517 mypy-extensions==0.4.3 # via black pathspec==0.9.0 # via black pep517==0.12.0 # via pip-tools +pip==24.2 + # via pip-tools pip-tools==6.4.0 # via -r requirements/_tools.in pyyaml==5.4 @@ -39,6 +25,8 @@ pyyaml==5.4 # watchdog regex==2022.1.18 # via black +setuptools==75.1.0 + # via pip-tools toml==0.10.2 # via # -c requirements/_test.txt @@ -55,12 +43,3 @@ watchdog==2.1.6 # via -r requirements/_tools.in wheel==0.37.1 # via pip-tools -zipp==3.4.0 - # via - # -c requirements/_test.txt - # importlib-metadata - # pep517 - -# The following packages are considered to be unsafe in a requirements file: -# pip -# setuptools diff --git a/services/director/requirements/ci.txt b/services/director/requirements/ci.txt index 4774c2e2302..8edcd5f2bfe 100644 --- a/services/director/requirements/ci.txt +++ b/services/director/requirements/ci.txt @@ -8,7 +8,6 @@ # installs base + tests requirements --requirement _test.txt ---requirement _tools.txt # installs current package . diff --git a/services/dynamic-scheduler/Dockerfile b/services/dynamic-scheduler/Dockerfile index fb2db946f75..bc94b83125a 100644 --- a/services/dynamic-scheduler/Dockerfile +++ b/services/dynamic-scheduler/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -58,7 +58,7 @@ EXPOSE 8000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -101,7 +101,7 @@ RUN \ # + /build # + services/dynamic-scheduler [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/dynamic-scheduler [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -160,7 +160,7 @@ CMD ["/bin/sh", "services/dynamic-scheduler/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/dynamic-scheduler diff --git a/services/dynamic-sidecar/Dockerfile b/services/dynamic-sidecar/Dockerfile index c02ba67c9de..3be8bae74d0 100644 --- a/services/dynamic-sidecar/Dockerfile +++ b/services/dynamic-sidecar/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: # cd sercices/dynamic-sidecar @@ -99,7 +99,7 @@ RUN mkdir -p "${DYNAMIC_SIDECAR_SHARED_STORE_DIR}" && \ # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -146,7 +146,7 @@ COPY --chown=root:root services/dynamic-sidecar/scripts/Makefile /root # + /build # + services/dynamic-sidecar [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -167,7 +167,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/dynamic-sidecar [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -208,7 +208,7 @@ CMD ["/bin/sh", "services/dynamic-sidecar/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_BOOT_MODE=development diff --git a/services/dynamic-sidecar/requirements/_base.txt b/services/dynamic-sidecar/requirements/_base.txt index 35cd6843f2b..49082d6f508 100644 --- a/services/dynamic-sidecar/requirements/_base.txt +++ b/services/dynamic-sidecar/requirements/_base.txt @@ -59,6 +59,8 @@ anyio==4.3.0 # faststream # httpx # starlette +appdirs==1.4.4 + # via pint arrow==1.3.0 # via # -r requirements/../../../packages/models-library/requirements/_base.in @@ -143,6 +145,10 @@ faststream==0.5.10 # via # -r requirements/../../../packages/service-library/requirements/_base.in # -r requirements/../../../packages/simcore-sdk/requirements/../../../packages/service-library/requirements/_base.in +flexcache==0.3 + # via pint +flexparser==0.3.1 + # via pint frozenlist==1.4.1 # via # aiohttp @@ -307,7 +313,7 @@ packaging==24.0 # via -r requirements/../../../packages/simcore-sdk/requirements/_base.in pamqp==3.3.0 # via aiormq -pint==0.23 +pint==0.24.3 # via -r requirements/../../../packages/simcore-sdk/requirements/_base.in prometheus-client==0.20.0 # via @@ -514,6 +520,8 @@ typing-extensions==4.11.0 # alembic # fastapi # faststream + # flexcache + # flexparser # opentelemetry-sdk # pint # pydantic diff --git a/services/efs-guardian/Dockerfile b/services/efs-guardian/Dockerfile index 5d470ee4af4..229e43563c4 100644 --- a/services/efs-guardian/Dockerfile +++ b/services/efs-guardian/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -96,7 +96,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -138,7 +138,7 @@ RUN \ # + /build # + services/efs-guardian [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -160,7 +160,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/efs-guardian [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -196,7 +196,7 @@ CMD ["/bin/sh", "services/efs-guardian/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/efs-guardian diff --git a/services/invitations/Dockerfile b/services/invitations/Dockerfile index b7635329edc..5d935426c48 100644 --- a/services/invitations/Dockerfile +++ b/services/invitations/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -58,7 +58,7 @@ EXPOSE 8000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -101,7 +101,7 @@ RUN \ # + /build # + services/invitations [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/invitations [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -160,7 +160,7 @@ CMD ["/bin/sh", "services/invitations/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/invitations diff --git a/services/migration/Dockerfile b/services/migration/Dockerfile index 9cd1988399b..d70eec97f93 100644 --- a/services/migration/Dockerfile +++ b/services/migration/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base LABEL maintainer=sanderegg @@ -33,7 +33,7 @@ ENV PATH="${VIRTUAL_ENV}/bin:$PATH" # -------------------------------------------- -FROM base as build +FROM base AS build RUN --mount=type=cache,target=/var/cache/apt,mode=0755,sharing=private \ --mount=type=cache,target=/var/lib/apt,mode=0755,sharing=private \ @@ -68,7 +68,7 @@ RUN \ # -------------------------------------------- -FROM base as production +FROM base AS production ENV PYTHONOPTIMIZE=TRUE diff --git a/services/osparc-gateway-server/Dockerfile b/services/osparc-gateway-server/Dockerfile index 150063ce0fc..59f55c8b3b6 100644 --- a/services/osparc-gateway-server/Dockerfile +++ b/services/osparc-gateway-server/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bullseye as base +FROM python:${PYTHON_VERSION}-slim-bullseye AS base ARG TARGETPLATFORM ARG BUILDPLATFORM RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" @@ -58,7 +58,7 @@ EXPOSE 8000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -108,7 +108,7 @@ RUN dpkgArch="$(dpkg --print-architecture)";\ # + /build # + services/osparc-gateway-server [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET=prod-only-deps @@ -128,7 +128,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/osparc-gateway-server [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -164,7 +164,7 @@ CMD ["/bin/sh", "services/osparc-gateway-server/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development diff --git a/services/payments/Dockerfile b/services/payments/Dockerfile index 692541c29d0..90cbb1c908e 100644 --- a/services/payments/Dockerfile +++ b/services/payments/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -58,7 +58,7 @@ EXPOSE 8000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -101,7 +101,7 @@ RUN \ # + /build # + services/payments [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/payments [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -160,7 +160,7 @@ CMD ["/bin/sh", "services/payments/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/payments diff --git a/services/payments/requirements/_base.txt b/services/payments/requirements/_base.txt index d4c08c97591..9c6ed81bca4 100644 --- a/services/payments/requirements/_base.txt +++ b/services/payments/requirements/_base.txt @@ -323,7 +323,7 @@ pyyaml==6.0.1 # -c requirements/../../../requirements/constraints.txt # -r requirements/../../../packages/service-library/requirements/_base.in # uvicorn -redis==5.0.8 +redis==5.0.4 # via # -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../packages/postgres-database/requirements/../../../requirements/constraints.txt diff --git a/services/resource-usage-tracker/Dockerfile b/services/resource-usage-tracker/Dockerfile index 31001e4f735..55976c00c53 100644 --- a/services/resource-usage-tracker/Dockerfile +++ b/services/resource-usage-tracker/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: @@ -59,7 +59,7 @@ EXPOSE 3000 # # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET=build @@ -101,7 +101,7 @@ RUN \ # + /build # + services/resource-usage-tracker [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -123,7 +123,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + services/resource-usage-tracker [scu:scu] # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -159,7 +159,7 @@ CMD ["/bin/sh", "services/resource-usage-tracker/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/resource-usage-tracker diff --git a/services/static-webserver/client/tools/qooxdoo-kit/builder/Dockerfile b/services/static-webserver/client/tools/qooxdoo-kit/builder/Dockerfile index 5890069e77b..d5ec65a2592 100644 --- a/services/static-webserver/client/tools/qooxdoo-kit/builder/Dockerfile +++ b/services/static-webserver/client/tools/qooxdoo-kit/builder/Dockerfile @@ -5,14 +5,14 @@ # Note: context at osparc-simcore/services/static-webserver/client expected # ARG tag -FROM itisfoundation/qooxdoo-kit:${tag} as touch +FROM itisfoundation/qooxdoo-kit:${tag} AS touch WORKDIR /project ENV PATH=/home/node/node_modules/.bin:${PATH} RUN mkdir /project/build-output -FROM touch as build-client +FROM touch AS build-client # Installs contributions # Install packages (warning: cache might keep these library out-of-date!) @@ -59,7 +59,7 @@ RUN \ python3 ./scripts/post-compile.py -FROM joseluisq/static-web-server:2.32.1-alpine as server-base +FROM joseluisq/static-web-server:2.32.1-alpine AS server-base LABEL org.opencontainers.image.authors="GitHK, odeimaiz" @@ -79,12 +79,12 @@ RUN chown -R "${SC_USER_NAME}:${SC_USER_NAME}" /entrypoint.sh && \ USER ${SC_USER_NAME} -FROM server-base as production +FROM server-base AS production # front-end client last we copy the client application directly inside COPY --from=build-client \ --chown=${SC_USER_NAME}:${SC_USER_NAME} \ /project/build-output "/static-content" ENV SC_BUILD_TARGET production -FROM server-base as development +FROM server-base AS development ENV SC_BUILD_TARGET development diff --git a/services/storage/Dockerfile b/services/storage/Dockerfile index 688f5dfa9f9..12e60feb78d 100644 --- a/services/storage/Dockerfile +++ b/services/storage/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: # cd sercices/storage @@ -66,7 +66,7 @@ EXPOSE 8080 # + /build WORKDIR # -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET build @@ -112,7 +112,7 @@ RUN \ # + /build # + services/storage [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -133,7 +133,7 @@ RUN \ # --------------------------Production stage ------------------- # Final cleanup up to reduce image size and startup setup # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production \ @@ -175,7 +175,7 @@ CMD ["/bin/sh", "services/storage/docker/boot.sh"] # + packages (mounted volume) # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET=development \ SC_DEVEL_MOUNT=/devel/services/storage/ diff --git a/services/web/Dockerfile b/services/web/Dockerfile index 1e134f8c106..1a1a443333a 100644 --- a/services/web/Dockerfile +++ b/services/web/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG PYTHON_VERSION="3.11.9" -FROM python:${PYTHON_VERSION}-slim-bookworm as base +FROM python:${PYTHON_VERSION}-slim-bookworm AS base # # USAGE: # cd sercices/web @@ -69,7 +69,7 @@ EXPOSE 8080 # + src # + tests -FROM base as build +FROM base AS build ENV SC_BUILD_TARGET build @@ -111,7 +111,7 @@ RUN \ # + /build # + services/web/server [scu:scu] WORKDIR # -FROM build as prod-only-deps +FROM build AS prod-only-deps ENV SC_BUILD_TARGET prod-only-deps @@ -133,7 +133,7 @@ RUN \ # + /home/scu $HOME = WORKDIR # + docker # -FROM base as production +FROM base AS production ENV SC_BUILD_TARGET=production \ SC_BOOT_MODE=production @@ -185,7 +185,7 @@ CMD ["services/web/server/docker/boot.sh"] # + /devel WORKDIR # + services (mounted volume) # -FROM build as development +FROM build AS development ENV SC_BUILD_TARGET development diff --git a/services/web/server/requirements/_base.txt b/services/web/server/requirements/_base.txt index b7d14fef70a..bf5eb3e7c29 100644 --- a/services/web/server/requirements/_base.txt +++ b/services/web/server/requirements/_base.txt @@ -75,6 +75,8 @@ anyio==4.3.0 # via # fast-depends # faststream +appdirs==1.4.4 + # via pint arrow==1.2.3 # via # -r requirements/../../../../packages/models-library/requirements/_base.in @@ -164,6 +166,10 @@ faststream==0.5.10 # via # -r requirements/../../../../packages/service-library/requirements/_base.in # -r requirements/../../../../packages/simcore-sdk/requirements/../../../packages/service-library/requirements/_base.in +flexcache==0.3 + # via pint +flexparser==0.3.1 + # via pint frozenlist==1.4.1 # via # -c requirements/./constraints.txt @@ -365,7 +371,7 @@ passlib==1.7.4 # via -r requirements/_base.in pillow==10.3.0 # via captcha -pint==0.19.2 +pint==0.24.3 # via # -r requirements/../../../../packages/simcore-sdk/requirements/_base.in # -r requirements/_base.in @@ -564,7 +570,10 @@ typing-extensions==4.12.0 # aiodebug # aiodocker # faststream + # flexcache + # flexparser # opentelemetry-sdk + # pint # pydantic # typer ujson==5.5.0 diff --git a/services/web/server/src/simcore_service_webserver/catalog/_models.py b/services/web/server/src/simcore_service_webserver/catalog/_models.py index 4e2f4147e48..2432e98bc96 100644 --- a/services/web/server/src/simcore_service_webserver/catalog/_models.py +++ b/services/web/server/src/simcore_service_webserver/catalog/_models.py @@ -11,8 +11,7 @@ ServiceOutputKey, ) from models_library.services import BaseServiceIOModel -from pint import PintError, UnitRegistry -from pint.quantity import Quantity # pylint:disable=no-name-in-module +from pint import PintError, Quantity, UnitRegistry _logger = logging.getLogger(__name__) diff --git a/services/web/server/tests/integration/01/test_garbage_collection.py b/services/web/server/tests/integration/01/test_garbage_collection.py index 2dcdb190ea9..c52977d7115 100644 --- a/services/web/server/tests/integration/01/test_garbage_collection.py +++ b/services/web/server/tests/integration/01/test_garbage_collection.py @@ -8,7 +8,7 @@ from collections.abc import AsyncIterable, Awaitable, Callable from copy import deepcopy from pathlib import Path -from typing import Any +from typing import Any, NamedTuple from unittest import mock from uuid import UUID, uuid4 @@ -275,7 +275,7 @@ async def get_template_project( ) -async def get_group(client, user): +async def get_group(client: TestClient, user): """Creates a group for a given user""" return await create_user_group( app=client.app, @@ -284,7 +284,7 @@ async def get_group(client, user): ) -async def invite_user_to_group(client, owner, invitee, group): +async def invite_user_to_group(client: TestClient, owner, invitee, group): """Invite a user to a group on which the owner has writes over""" await add_user_in_group( client.app, @@ -303,13 +303,19 @@ async def change_user_role( ) +class SioConnectionData(NamedTuple): + sio: socketio.AsyncClient + resource_key: UserSessionDict + + async def connect_to_socketio( - client, + client: TestClient, user, socketio_client_factory: Callable[..., Awaitable[socketio.AsyncClient]], -): +) -> SioConnectionData: """Connect a user to a socket.io""" - socket_registry = get_registry(client.server.app) + assert client.app + socket_registry = get_registry(client.app) cur_client_session_id = f"{uuid4()}" sio = await socketio_client_factory(cur_client_session_id, client) resource_key: UserSessionDict = { @@ -323,14 +329,18 @@ async def connect_to_socketio( resource_key, "socket_id" ) assert len(await socket_registry.find_resources(resource_key, "socket_id")) == 1 - return sio, resource_key + return SioConnectionData(sio, resource_key) -async def disconnect_user_from_socketio(client, sio_connection_data) -> None: +async def disconnect_user_from_socketio( + client: TestClient, sio_connection_data: SioConnectionData +) -> None: """disconnect a previously connected socket.io connection""" sio, resource_key = sio_connection_data sid = sio.get_sid() - socket_registry = get_registry(client.server.app) + + assert client.app + socket_registry = get_registry(client.app) await sio.disconnect() assert not sio.sid await asyncio.sleep(0) # just to ensure there is a context switch diff --git a/tests/e2e/docker/Dockerfile b/tests/e2e/docker/Dockerfile index b4e2d4012c5..0f9413777c3 100644 --- a/tests/e2e/docker/Dockerfile +++ b/tests/e2e/docker/Dockerfile @@ -1,5 +1,5 @@ ARG NODE_VERSION="14" -FROM node:${NODE_VERSION}-slim as base +FROM node:${NODE_VERSION}-slim AS base RUN apt-get update && \ apt-get install -y --no-install-recommends \ diff --git a/tests/swarm-deploy/requirements/_test.txt b/tests/swarm-deploy/requirements/_test.txt index 16c8a272e9b..467cf442c6b 100644 --- a/tests/swarm-deploy/requirements/_test.txt +++ b/tests/swarm-deploy/requirements/_test.txt @@ -364,7 +364,7 @@ pyyaml==6.0.2 # -r requirements/../../../packages/service-library/requirements/_base.in # -r requirements/../../../packages/simcore-sdk/requirements/../../../packages/service-library/requirements/_base.in # -r requirements/_test.in -redis==5.0.8 +redis==5.0.4 # via # -c requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt # -c requirements/../../../packages/service-library/requirements/../../../packages/models-library/requirements/../../../requirements/constraints.txt diff --git a/tests/swarm-deploy/test_service_images.py b/tests/swarm-deploy/test_service_images.py index 6fa388b7519..fa18ea6f837 100644 --- a/tests/swarm-deploy/test_service_images.py +++ b/tests/swarm-deploy/test_service_images.py @@ -31,7 +31,7 @@ def _extract_from_dockerfile(service_name: str) -> str: ) dockerfile = dockerfile_path.read_text() - m = re.search(r"FROM (.+) as base", dockerfile) + m = re.search(r"FROM (.+) AS base", dockerfile) assert m, f"{dockerfile_path} has no 'base' alias!?" return m.group(0)