Skip to content

Commit ef4b668

Browse files
authored
Merge branch 'master' into enh/workspace-ui-element
2 parents 5d04949 + ea88f43 commit ef4b668

File tree

80 files changed

+656
-635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+656
-635
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ops/
88
*.py[cod]
99

1010
# virtualenv
11-
.venv
11+
**/.venv
1212

1313
#python eggs
1414
**/*.egg-info

packages/aws-library/requirements/_base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ dnspython==2.6.1
8181
# via email-validator
8282
email-validator==2.2.0
8383
# via pydantic
84-
fast-depends==2.4.11
84+
fast-depends==2.4.12
8585
# via faststream
8686
faststream==0.5.23
8787
# via -r requirements/../../../packages/service-library/requirements/_base.in

packages/postgres-database/docker/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# syntax=docker/dockerfile:1
2-
FROM python:3.6-slim AS base
2+
ARG PYTHON_VERSION="3.11.9"
3+
ARG UV_VERSION="0.4"
4+
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
5+
# we docker image is built based on debian
6+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
37

48
LABEL maintainer=sanderegg
59

@@ -22,16 +26,14 @@ RUN apt-get update \
2226
&& apt-get clean \
2327
&& rm -rf /var/lib/apt/lists/*
2428

25-
# NOTE: install https://github.com/astral-sh/uv ultra-fast rust-based pip replacement
26-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
27-
pip install uv~=0.2
29+
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
30+
COPY --from=uv_build /uv /uvx /bin/
2831

2932
# NOTE: python virtualenv is used here such that installed packages may be moved to production image easily by copying the venv
3033
RUN uv venv "${VIRTUAL_ENV}"
3134

32-
RUN --mount=type=cache,mode=0755,target=/root/.cache/uv \
35+
RUN --mount=type=cache,target=/root/.cache/uv \
3336
uv pip install --upgrade \
34-
pip~=24.0 \
3537
wheel \
3638
setuptools
3739

@@ -44,6 +46,8 @@ RUN git clone --single-branch --branch ${GIT_BRANCH} ${GIT_REPOSITORY} osparc-si
4446
FROM base AS production
4547

4648
ENV PYTHONOPTIMIZE=TRUE
49+
# https://docs.astral.sh/uv/guides/integration/docker/#compiling-bytecode
50+
ENV UV_COMPILE_BYTECODE=1
4751

4852
WORKDIR /home/scu
4953
# ensure home folder is read/writable for user scu

packages/postgres-database/scripts/erd/Dockerfile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# syntax=docker/dockerfile:1
2+
3+
# Define arguments in the global scope
24
ARG PYTHON_VERSION="3.11.9"
5+
ARG UV_VERSION="0.4"
6+
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7+
# we docker image is built based on debian
38
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
49

510
RUN apt-get update \
@@ -15,15 +20,14 @@ RUN apt-get update \
1520
&& apt-get clean
1621

1722

18-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
19-
pip install --upgrade \
20-
pip~=24.0 \
23+
RUN --mount=type=cache,target=/root/.cache/uv \
24+
uv pip install --upgrade \
2125
wheel \
2226
setuptools
2327

2428

2529
# devenv
2630
COPY requirements.txt requirements.txt
27-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
28-
pip install \
29-
-r requirements.txt
31+
RUN --mount=type=cache,target=/root/.cache/uv \
32+
uv pip sync \
33+
requirements.txt

packages/service-integration/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# syntax=docker/dockerfile:1
2+
3+
# Define arguments in the global scope
24
ARG PYTHON_VERSION="3.11.9"
5+
ARG UV_VERSION="0.4"
6+
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7+
# we docker image is built based on debian
38
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
49

510
LABEL maintainer=pcrespov
@@ -38,12 +43,13 @@ ENV LANG=C.UTF-8
3843
# Turns off writing .pyc files; superfluous on an ephemeral container.
3944
ENV PYTHONDONTWRITEBYTECODE=1 \
4045
VIRTUAL_ENV=/home/scu/.venv
46+
# https://docs.astral.sh/uv/guides/integration/docker/#compiling-bytecode
47+
ENV UV_COMPILE_BYTECODE=1
4148

4249
# Ensures that the python and pip executables used
4350
# in the image will be those from our virtualenv.
4451
ENV PATH="${VIRTUAL_ENV}/bin:$PATH"
4552

46-
4753
# -------------------------- Build stage -------------------
4854

4955
FROM base AS build
@@ -55,15 +61,14 @@ RUN --mount=type=cache,target=/var/cache/apt,mode=0755,sharing=private \
5561
&& apt-get install -y --no-install-recommends \
5662
build-essential
5763

58-
# NOTE: install https://github.com/astral-sh/uv ultra-fast rust-based pip replacement
59-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
60-
pip install uv~=0.2
64+
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
65+
COPY --from=uv_build /uv /uvx /bin/
6166

6267
# NOTE: python virtualenv is used here such that installed
6368
# packages may be moved to production image easily by copying the venv
6469
RUN uv venv "${VIRTUAL_ENV}"
6570

66-
RUN --mount=type=cache,mode=0755,target=/root/.cache/uv \
71+
RUN --mount=type=cache,target=/root/.cache/uv \
6772
uv pip install --upgrade \
6873
pip~=24.0 \
6974
wheel \
@@ -74,7 +79,7 @@ WORKDIR /build/packages/service-integration
7479
RUN \
7580
--mount=type=bind,source=packages,target=/build/packages,rw \
7681
--mount=type=bind,source=packages/service-integration,target=/build/packages/service-integration,rw \
77-
--mount=type=cache,mode=0755,target=/root/.cache/uv \
82+
--mount=type=cache,target=/root/.cache/uv \
7883
uv pip install \
7984
--requirement requirements/prod.txt \
8085
&& uv pip list
@@ -86,8 +91,6 @@ FROM base AS development
8691
# NOTE: this is necessary to allow to build development images but is the same as production here
8792
FROM base AS production
8893

89-
ENV PYTHONOPTIMIZE=TRUE
90-
9194
WORKDIR /home/scu
9295
# ensure home folder is read/writable for user scu
9396
RUN chown -R scu /home/scu

packages/service-library/requirements/_base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ dnspython==2.6.1
5353
# via email-validator
5454
email-validator==2.2.0
5555
# via pydantic
56-
fast-depends==2.4.11
56+
fast-depends==2.4.12
5757
# via faststream
5858
faststream==0.5.23
5959
# via -r requirements/_base.in

packages/service-library/src/servicelib/deferred_tasks/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ async def wrapper(*args, **kwargs):
3030
f"Please check code at: '{func.__module__}.{func.__name__}'"
3131
)
3232
_logger.exception(msg)
33-
raise RejectMessage(msg) from e
33+
raise RejectMessage(reason=msg) from e
3434

3535
return wrapper

packages/simcore-sdk/requirements/_base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ dnspython==2.6.1
7979
# via email-validator
8080
email-validator==2.2.0
8181
# via pydantic
82-
fast-depends==2.4.11
82+
fast-depends==2.4.12
8383
# via faststream
8484
faststream==0.5.23
8585
# via -r requirements/../../../packages/service-library/requirements/_base.in

requirements/tools/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#
1010
#
1111
ARG PYTHON_VERSION="3.11.9"
12+
ARG UV_VERSION="0.4"
13+
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
14+
# we docker image is built based on debian
1215
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
1316

1417
ENV VIRTUAL_ENV=/home/scu/.venv
@@ -24,24 +27,21 @@ RUN --mount=type=cache,target=/var/cache/apt,mode=0755,sharing=private \
2427
&& apt-get clean -y
2528

2629

27-
# NOTE: install https://github.com/astral-sh/uv ultra-fast rust-based pip replacement
28-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
29-
pip install uv~=0.2
30+
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
31+
COPY --from=uv_build /uv /uvx /bin/
3032

3133
RUN uv venv "${VIRTUAL_ENV}"
3234

33-
RUN --mount=type=cache,mode=0755,target=/root/.cache/uv \
35+
RUN --mount=type=cache,target=/root/.cache/uv \
3436
uv pip install --upgrade \
35-
pip~=24.0 \
3637
wheel \
3738
setuptools
3839

3940

4041

4142
# devenv
42-
RUN --mount=type=cache,mode=0755,target=/root/.cache/uv \
43+
RUN --mount=type=cache,target=/root/.cache/uv \
4344
uv pip install \
44-
pip-tools \
4545
pipreqs \
4646
pipdeptree && \
4747
uv pip list -vv

scripts/erd/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
#
99

1010
ARG PYTHON_VERSION="3.11.9"
11+
ARG UV_VERSION="0.4"
12+
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
13+
# we docker image is built based on debian
1114
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
1215

1316
RUN apt-get update \
@@ -22,13 +25,14 @@ RUN apt-get update \
2225
&& rm -rf /var/lib/apt/lists/* \
2326
&& apt-get clean
2427

28+
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
29+
COPY --from=uv_build /uv /uvx /bin/
2530

26-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
27-
pip install --upgrade \
28-
pip~=24.0 \
31+
RUN --mount=type=cache,target=/root/.cache/uv \
32+
uv pip install --upgrade \
2933
wheel \
3034
setuptools
3135

3236
COPY requirements.txt .
33-
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
34-
pip install -r requirements.txt
37+
RUN --mount=type=cache,target=/root/.cache/uv \
38+
uv pip install -r requirements.txt

0 commit comments

Comments
 (0)