From b08a6dd8ee1ac457cee730dccb3498dd05019dea Mon Sep 17 00:00:00 2001 From: Yakov Goldberg Date: Thu, 11 Sep 2025 14:40:26 -0700 Subject: [PATCH 1/3] [YOLO] use gunicorn in sklearn env --- .../python3_sklearn/Dockerfile | 5 + .../python3_sklearn/requirements.txt | 91 ++++++++++--------- 2 files changed, 54 insertions(+), 42 deletions(-) diff --git a/public_dropin_environments/python3_sklearn/Dockerfile b/public_dropin_environments/python3_sklearn/Dockerfile index 5e0ab8862..0737394db 100644 --- a/public_dropin_environments/python3_sklearn/Dockerfile +++ b/public_dropin_environments/python3_sklearn/Dockerfile @@ -60,6 +60,11 @@ ENV ADDRESS=0.0.0.0:8080 ENV WITH_ERROR_SERVER=1 \ PYTHONUNBUFFERED=1 +# ENV MLOPS_RUNTIME_PARAM_DRUM_CLIENT_REQUEST_TIMEOUT='{"type": "numeric", "payload": 660}' + +# Gunicorn configuration +ENV MLOPS_RUNTIME_PARAM_DRUM_SERVER_TYPE='{"type": "string", "payload": "gunicorn"}' + COPY ./*.sh ${CODE_DIR}/ WORKDIR ${CODE_DIR} diff --git a/public_dropin_environments/python3_sklearn/requirements.txt b/public_dropin_environments/python3_sklearn/requirements.txt index 5f75f0e78..acfadf27e 100644 --- a/public_dropin_environments/python3_sklearn/requirements.txt +++ b/public_dropin_environments/python3_sklearn/requirements.txt @@ -1,87 +1,89 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.12 # by the following command: # # pip-compile --index-url=https://pypi.org/simple --no-annotate --no-emit-index-url --no-emit-trusted-host --output-file=requirements.txt requirements.in # annotated-types==0.7.0 argcomplete==3.6.2 -azure-core==1.34.0 -azure-identity==1.23.0 +azure-core==1.35.1 +azure-identity==1.25.0 azure-storage-blob==12.19.0 blinker==1.9.0 -boto3==1.38.23 -botocore==1.38.23 +boto3==1.40.30 +botocore==1.40.30 cachetools==5.5.2 -certifi==2025.4.26 -cffi==1.17.1 -charset-normalizer==3.4.2 +certifi==2025.8.3 +cffi==2.0.0 +charset-normalizer==3.4.3 click==8.2.1 -cryptography==45.0.3 -datarobot==3.7.1 -datarobot-drum==1.16.19 +cryptography==45.0.7 +datarobot==3.8.2 +datarobot-drum==1.17.1 datarobot-mlops==11.1.0 datarobot-storage==2.2.0 -deprecated==1.2.18 docker==7.1.0 filechunkio==1.8 -flask==3.1.1 -google-api-core==2.25.0rc1 -google-auth==2.40.2 +flask==3.1.2 +gevent==25.8.2 +google-api-core==2.25.1 +google-auth==2.40.3 google-cloud-core==2.4.3 google-cloud-storage==2.19.0 google-crc32c==1.7.1 google-resumable-media==2.7.2 googleapis-common-protos==1.70.0 +greenlet==3.2.4 +gunicorn==23.0.0 idna==3.10 -importlib-metadata==8.6.1 +importlib-metadata==8.7.0 isodate==0.7.2 itsdangerous==2.2.0 jinja2==3.1.6 jmespath==1.0.1 -joblib==1.5.1 +joblib==1.5.2 julia==0.5.7 markupsafe==3.0.2 memory-profiler==0.61.0 -msal==1.32.3 +msal==1.33.0 msal-extensions==1.3.1 mypy-extensions==1.1.0 -numpy==2.2.6 -opentelemetry-api==1.33.1 -opentelemetry-exporter-otlp-proto-common==1.33.1 -opentelemetry-exporter-otlp-proto-http==1.33.1 -opentelemetry-instrumentation==0.54b1 -opentelemetry-instrumentation-aiohttp-client==0.54b1 -opentelemetry-instrumentation-requests==0.54b1 -opentelemetry-proto==1.33.1 -opentelemetry-sdk==1.33.1 -opentelemetry-semantic-conventions==0.54b1 -opentelemetry-util-http==0.54b1 -orjson==3.10.18 +numpy==2.3.3 +opentelemetry-api==1.37.0 +opentelemetry-exporter-otlp-proto-common==1.37.0 +opentelemetry-exporter-otlp-proto-http==1.37.0 +opentelemetry-instrumentation==0.58b0 +opentelemetry-instrumentation-aiohttp-client==0.58b0 +opentelemetry-instrumentation-requests==0.58b0 +opentelemetry-proto==1.37.0 +opentelemetry-sdk==1.37.0 +opentelemetry-semantic-conventions==0.58b0 +opentelemetry-util-http==0.58b0 +orjson==3.11.3 packaging==25.0 -pandas==2.2.3 +pandas==2.3.2 pillow==11.3.0 -progress==1.6 +progress==1.6.1 proto-plus==1.26.1 -protobuf==5.29.5 +protobuf==6.32.1 psutil==7.0.0 py4j==0.10.9.9 pyasn1==0.6.1 pyasn1-modules==0.4.2 -pycparser==2.22 -pydantic==2.11.5 +pycparser==2.23 +pydantic==2.11.7 pydantic-core==2.33.2 pyjwt[crypto]==2.10.1 python-dateutil==2.9.0.post0 pytz==2025.2 pyyaml==6.0.2 -requests==2.32.4 +requests==2.32.5 requests-toolbelt==1.0.0 rsa==4.9.1 ruamel-yaml==0.17.4 -s3transfer==0.13.0 -scikit-learn==1.6.1 -scipy==1.15.3 +s3transfer==0.14.0 +scikit-learn==1.7.2 +scipy==1.16.2 six==1.17.0 strenum==0.4.15 strictyaml==1.4.2 @@ -89,10 +91,15 @@ termcolor==3.1.0 texttable==1.7.0 threadpoolctl==3.6.0 trafaret==2.1.1 -typing-extensions==4.13.2 +typing-extensions==4.15.0 typing-inspection==0.4.1 tzdata==2025.2 urllib3==2.5.0 werkzeug==3.1.3 -wrapt==1.17.2 -zipp==3.22.0 +wrapt==1.17.3 +zipp==3.23.0 +zope-event==6.0 +zope-interface==8.0 + +# The following packages are considered to be unsafe in a requirements file: +# setuptools From 8117a45c7a6ccb48817220cd2031ff03fccf1934 Mon Sep 17 00:00:00 2001 From: Yakov Goldberg Date: Fri, 12 Sep 2025 14:21:00 -0700 Subject: [PATCH 2/3] fix drum --- custom_model_runner/datarobot_drum/drum/entry_point.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_model_runner/datarobot_drum/drum/entry_point.py b/custom_model_runner/datarobot_drum/drum/entry_point.py index f21e647fb..05c156c70 100644 --- a/custom_model_runner/datarobot_drum/drum/entry_point.py +++ b/custom_model_runner/datarobot_drum/drum/entry_point.py @@ -1,11 +1,14 @@ from datarobot_drum.drum.gunicorn.run_gunicorn import main_gunicorn from datarobot_drum.drum.main import main from datarobot_drum import RuntimeParameters +from datarobot_drum.drum.utils.setup import setup_options def run_drum_server(): + options = setup_options() if ( - RuntimeParameters.has("DRUM_SERVER_TYPE") + options.subparser_name == "server" + and RuntimeParameters.has("DRUM_SERVER_TYPE") and str(RuntimeParameters.get("DRUM_SERVER_TYPE")).lower() == "gunicorn" ): main_gunicorn() From a099f48e6a7fd79852af8bbd2ca476b17958e568 Mon Sep 17 00:00:00 2001 From: svc-harness-git2 Date: Mon, 15 Sep 2025 19:20:54 +0000 Subject: [PATCH 3/3] Reconcile dependencies, updated IDs, tags --- public_dropin_environments/python3_sklearn/env_info.json | 6 +++--- public_dropin_environments/python3_sklearn/requirements.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public_dropin_environments/python3_sklearn/env_info.json b/public_dropin_environments/python3_sklearn/env_info.json index b83a6967f..ea96bf2b8 100644 --- a/public_dropin_environments/python3_sklearn/env_info.json +++ b/public_dropin_environments/python3_sklearn/env_info.json @@ -4,7 +4,7 @@ "description": "This template environment can be used to create artifact-only scikit-learn custom models. This environment contains scikit-learn and only requires your model artifact as a .pkl file and optionally a custom.py file.", "programmingLanguage": "python", "label": "", - "environmentVersionId": "68b7031b007044329700420c", + "environmentVersionId": "68c8670ac971d3122ce3effb", "environmentVersionDescription": "", "isPublic": true, "isDownloadable": true, @@ -14,8 +14,8 @@ "contextUrl": "https://github.com/datarobot/datarobot-user-models/tree/master/public_dropin_environments/python3_sklearn", "imageRepository": "env-python-sklearn", "tags": [ - "v11.2.0-68b7031b007044329700420c", - "68b7031b007044329700420c", + "v11.2.0-68c8670ac971d3122ce3effb", + "68c8670ac971d3122ce3effb", "v11.2.0-latest" ] } diff --git a/public_dropin_environments/python3_sklearn/requirements.txt b/public_dropin_environments/python3_sklearn/requirements.txt index acfadf27e..c4bfdaf3e 100644 --- a/public_dropin_environments/python3_sklearn/requirements.txt +++ b/public_dropin_environments/python3_sklearn/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.12 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile --index-url=https://pypi.org/simple --no-annotate --no-emit-index-url --no-emit-trusted-host --output-file=requirements.txt requirements.in @@ -48,7 +48,7 @@ memory-profiler==0.61.0 msal==1.33.0 msal-extensions==1.3.1 mypy-extensions==1.1.0 -numpy==2.3.3 +numpy==2.2.6 opentelemetry-api==1.37.0 opentelemetry-exporter-otlp-proto-common==1.37.0 opentelemetry-exporter-otlp-proto-http==1.37.0 @@ -83,7 +83,7 @@ rsa==4.9.1 ruamel-yaml==0.17.4 s3transfer==0.14.0 scikit-learn==1.7.2 -scipy==1.16.2 +scipy==1.15.3 six==1.17.0 strenum==0.4.15 strictyaml==1.4.2