You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openserverless.apache.org by ms...@apache.org on 2026/09/07 14:39:00 UTC
(openserverless-runtimes) 25/28: adding the sys image
This is an automated email from the ASF dual-hosted git repository.
sciabarracom pushed a commit to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-runtimes.git
commit af82fa439aeada611520f3d2c517d94a4cad82ee
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Mon Sep 7 12:11:03 2026 +0200
adding the sys image
---
.github/workflows/image.yaml | 13 +-
runtime/python/sys/DISCLAIMER | 11 +
runtime/python/sys/Dockerfile | 57 ++++++
runtime/python/sys/LICENSE | 391 ++++++++++++++++++++++++++++++++++++
runtime/python/sys/NOTICE | 149 ++++++++++++++
runtime/python/sys/README.md | 1 +
runtime/python/sys/WARN | 108 ++++++++++
runtime/python/sys/bin/compile | 140 +++++++++++++
runtime/python/sys/lib/launcher.py | 73 +++++++
runtime/python/sys/requirements.in | 29 +++
runtime/python/sys/requirements.txt | 99 +++++++++
runtimes.py | 25 ++-
12 files changed, 1084 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml
index b502595..b277acb 100644
--- a/.github/workflows/image.yaml
+++ b/.github/workflows/image.yaml
@@ -182,15 +182,16 @@ jobs:
# so entries for every language can stay listed here all the time.
matrix:
include:
- - { rt: go, ver: v1.25 }
- - { rt: go, ver: v1.26 }
- - { rt: go, ver: v1.27 }
- - { rt: nodejs, ver: v20 }
- - { rt: nodejs, ver: v22 }
- - { rt: nodejs, ver: v24 }
+ - { rt: python, ver: sys }
- { rt: python, ver: v3.11 }
- { rt: python, ver: v3.12 }
- { rt: python, ver: v3.13 }
+ - { rt: nodejs, ver: v20 }
+ - { rt: nodejs, ver: v22 }
+ - { rt: nodejs, ver: v24 }
+ - { rt: go, ver: v1.25 }
+ - { rt: go, ver: v1.26 }
+ - { rt: go, ver: v1.27 }
- { rt: java, ver: v8 }
- { rt: java, ver: v11 }
- { rt: java, ver: v17 }
diff --git a/runtime/python/sys/DISCLAIMER b/runtime/python/sys/DISCLAIMER
new file mode 100644
index 0000000..b505beb
--- /dev/null
+++ b/runtime/python/sys/DISCLAIMER
@@ -0,0 +1,11 @@
+Apache OpenServerless (Incubating) is an effort undergoing incubation at the Apache
+Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
+
diff --git a/runtime/python/sys/Dockerfile b/runtime/python/sys/Dockerfile
new file mode 100644
index 0000000..5a68db0
--- /dev/null
+++ b/runtime/python/sys/Dockerfile
@@ -0,0 +1,57 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ARG COMMON=missing:missing
+FROM ${COMMON} AS builder
+
+FROM python:3.12.14-bookworm
+ENV OW_EXECUTION_ENV=apacheopenserverless/runtime-python-v3.12.14
+COPY --from=builder /go/bin/proxy /bin/proxy
+
+# install zip
+RUN apt-get update && apt-get install -y python3-lxml zip \
+ && rm -rf /var/lib/apt/lists/*
+
+# Install common modules for python
+COPY requirements.txt requirements.txt
+
+RUN pip3 install --upgrade pip six wheel virtualenv
+RUN pip3 install --no-cache-dir -r requirements.txt
+
+RUN mkdir -p /action
+WORKDIR /
+
+ADD bin/compile /bin/compile
+ADD lib/launcher.py /lib/launcher.py
+
+# log initialization errors
+ENV OW_LOG_INIT_ERROR=1
+# the launcher must wait for an ack
+ENV OW_WAIT_FOR_ACK=1
+# using the runtime name to identify the execution environment
+# compiler script
+ENV OW_COMPILER=/bin/compile
+# home directory
+ENV HOME=/tmp
+
+WORKDIR /action
+RUN chown nobody:root /action ; chmod 0775 /action
+USER nobody
+# Apache release metadata (see DISCLAIMER, LICENSE, NOTICE, WARN)
+COPY DISCLAIMER LICENSE NOTICE WARN /
+
+ENTRYPOINT ["/bin/proxy"]
diff --git a/runtime/python/sys/LICENSE b/runtime/python/sys/LICENSE
new file mode 100644
index 0000000..63a7546
--- /dev/null
+++ b/runtime/python/sys/LICENSE
@@ -0,0 +1,391 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+
+==============================================================================
+LICENSES OF BUNDLED THIRD-PARTY SOFTWARE
+Container image: apache/openserverless-runtime-python:sys
+==============================================================================
+
+Apache OpenServerless itself is licensed under the Apache License,
+Version 2.0, reproduced above. The container image built from the
+Dockerfile beside this file additionally bundles the third-party
+components listed below, each under its own license.
+
+Refer to https://www.apache.org/legal/resolved.html for the ASF
+classification of these licenses. Components that are NOT compatible
+with the Apache License 2.0 are enumerated in the WARN file.
+
+------------------------------------------------------------------------------
+Summary by license
+------------------------------------------------------------------------------
+
+Apache-2.0
+ bcrypt (5.0.0)
+ boto3 (1.43.89)
+ botocore (1.43.89)
+ grpcio (1.83.1)
+ kafka-python (3.0.11)
+ minio (7.2.20)
+ pymilvus (3.0.1)
+ pymongo (4.18.0)
+ requests (2.34.2)
+ s3transfer (0.19.2)
+
+Apache-2.0 AND MIT
+ gopkg.in/yaml.v3 (v3.0.1)
+
+Apache-2.0 OR BSD-3-Clause
+ python-dateutil (2.9.0.post0)
+
+BSD-2-Clause AND Public Domain
+ pycryptodome (3.23.0)
+
+BSD-3-Clause
+ github.com/google/uuid (v1.6.0)
+ github.com/pmezard/go-difflib (v1.0.0)
+ golang.org/x/sys (v0.26.0)
+ idna (3.19)
+ pandas (3.0.5)
+ pg8000 (1.31.5)
+ protobuf (7.36.1)
+ pycparser (3.0)
+ python-dotenv (1.2.3)
+ python3-lxml ((Debian bookworm))
+
+BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0
+ numpy (2.5.3)
+
+ISC
+ dnspython (2.8.0)
+ github.com/davecgh/go-spew (v1.1.1)
+
+Info-ZIP
+ zip ((Debian bookworm))
+
+MIT
+ argon2-cffi (25.1.0)
+ argon2-cffi-bindings (26.1.0)
+ asn1crypto (1.5.1)
+ cachetools (7.1.8)
+ charset-normalizer (3.5.1)
+ github.com/mattn/go-colorable (v0.1.13)
+ github.com/mattn/go-isatty (v0.0.20)
+ github.com/rs/zerolog (v1.33.0)
+ github.com/stretchr/testify (v1.9.0)
+ httplib2 (0.32.0)
+ jmespath (1.1.0)
+ pyparsing (3.3.2)
+ pyyaml (6.0.3)
+ redis (8.1.0)
+ six (1.17.0)
+ urllib3 (2.7.0)
+
+MIT OR AFL-2.1
+ simplejson (4.1.2)
+
+MIT-0
+ cffi (2.1.1)
+ scramp (1.4.17)
+
+MPL-2.0
+ certifi (2026.7.22)
+
+MPL-2.0 AND (Apache-2.0 OR MIT)
+ orjson (3.12.0)
+
+PSF-2.0
+ typing-extensions (4.16.0)
+
+------------------------------------------------------------------------------
+Detail by component
+------------------------------------------------------------------------------
+
+Python packages preinstalled in the image (requirements.in)
+-----------------------------------------------------------
+ argon2-cffi (25.1.0) -- MIT
+ argon2-cffi-bindings (26.1.0) -- MIT
+ asn1crypto (1.5.1) -- MIT
+ bcrypt (5.0.0) -- Apache-2.0
+ boto3 (1.43.89) -- Apache-2.0
+ botocore (1.43.89) -- Apache-2.0
+ cachetools (7.1.8) -- MIT
+ certifi (2026.7.22) -- MPL-2.0
+ MPL-2.0 is ASF Category B; bundled unmodified as a separate file.
+ cffi (2.1.1) -- MIT-0
+ charset-normalizer (3.5.1) -- MIT
+ dnspython (2.8.0) -- ISC
+ grpcio (1.83.1) -- Apache-2.0
+ httplib2 (0.32.0) -- MIT
+ idna (3.19) -- BSD-3-Clause
+ jmespath (1.1.0) -- MIT
+ kafka-python (3.0.11) -- Apache-2.0
+ minio (7.2.20) -- Apache-2.0
+ numpy (2.5.3) -- BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0
+ orjson (3.12.0) -- MPL-2.0 AND (Apache-2.0 OR MIT)
+ MPL-2.0 component is ASF Category B; bundled unmodified. See WARN.
+ pandas (3.0.5) -- BSD-3-Clause
+ pg8000 (1.31.5) -- BSD-3-Clause
+ protobuf (7.36.1) -- BSD-3-Clause
+ pycparser (3.0) -- BSD-3-Clause
+ pycryptodome (3.23.0) -- BSD-2-Clause AND Public Domain
+ pymilvus (3.0.1) -- Apache-2.0
+ pymongo (4.18.0) -- Apache-2.0
+ pyparsing (3.3.2) -- MIT
+ python-dateutil (2.9.0.post0) -- Apache-2.0 OR BSD-3-Clause
+ python-dotenv (1.2.3) -- BSD-3-Clause
+ pyyaml (6.0.3) -- MIT
+ redis (8.1.0) -- MIT
+ requests (2.34.2) -- Apache-2.0
+ s3transfer (0.19.2) -- Apache-2.0
+ scramp (1.4.17) -- MIT-0
+ simplejson (4.1.2) -- MIT OR AFL-2.1
+ Dual-licensed; the MIT option is elected. See WARN.
+ six (1.17.0) -- MIT
+ typing-extensions (4.16.0) -- PSF-2.0
+ urllib3 (2.7.0) -- MIT
+
+Operating-system packages installed by the Dockerfile
+-----------------------------------------------------
+ python3-lxml ((Debian bookworm)) -- BSD-3-Clause
+ zip ((Debian bookworm)) -- Info-ZIP
+
+Action proxy (copied from the common builder image)
+---------------------------------------------------
+ github.com/google/uuid (v1.6.0) -- BSD-3-Clause
+ github.com/rs/zerolog (v1.33.0) -- MIT
+ github.com/stretchr/testify (v1.9.0) -- MIT
+ Test-only dependency.
+ github.com/davecgh/go-spew (v1.1.1) -- ISC
+ Transitive.
+ github.com/mattn/go-colorable (v0.1.13) -- MIT
+ Transitive.
+ github.com/mattn/go-isatty (v0.0.20) -- MIT
+ Transitive.
+ github.com/pmezard/go-difflib (v1.0.0) -- BSD-3-Clause
+ Transitive.
+ golang.org/x/sys (v0.26.0) -- BSD-3-Clause
+ Transitive.
+ gopkg.in/yaml.v3 (v3.0.1) -- Apache-2.0 AND MIT
+ Transitive.
+
+Base operating system image
+---------------------------
+ (see the FROM line of the Dockerfile) (-) -- mixed; see WARN
+ Operating-system components are supplied by the upstream base image and are not
+ redistributed by the ASF in source form.
+
+------------------------------------------------------------------------------
+Full license texts
+------------------------------------------------------------------------------
+
+The complete text of the Apache License 2.0 is reproduced at the top of
+this file. The complete texts of the other licenses referenced above are
+distributed with each component inside the container image, in the
+package metadata directories of the respective package manager:
+
+ * Python packages: <site-packages>/<dist>.dist-info/ (LICENSE, METADATA)
+ * Node.js packages: /node_modules/<pkg>/LICENSE
+ * PHP packages: /phpAction/composer/vendor/<pkg>/LICENSE
+ * Go modules: vendored module sources / pkg.go.dev
+ * Debian packages: /usr/share/doc/<pkg>/copyright
diff --git a/runtime/python/sys/NOTICE b/runtime/python/sys/NOTICE
new file mode 100644
index 0000000..5e5619e
--- /dev/null
+++ b/runtime/python/sys/NOTICE
@@ -0,0 +1,149 @@
+Apache OpenServerless (Incubating)
+Copyright 2024 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+------------------------------------------------------------------------------
+Container image: apache/openserverless-runtime-python:sys
+------------------------------------------------------------------------------
+
+This image bundles third-party software. The components below are
+redistributed under the licenses recorded in the LICENSE file that
+accompanies this NOTICE. Components flagged '*** SEE WARN ***' are
+listed in the WARN file as incompatible with the Apache License 2.0.
+
+Python packages preinstalled in the image (requirements.in)
+-----------------------------------------------------------
+ * argon2-cffi (25.1.0)
+ License: MIT
+ * argon2-cffi-bindings (26.1.0)
+ License: MIT
+ * asn1crypto (1.5.1)
+ License: MIT
+ * bcrypt (5.0.0)
+ License: Apache-2.0
+ * boto3 (1.43.89)
+ License: Apache-2.0
+ * botocore (1.43.89)
+ License: Apache-2.0
+ * cachetools (7.1.8)
+ License: MIT
+ * certifi (2026.7.22)
+ License: MPL-2.0
+ MPL-2.0 is ASF Category B; bundled unmodified as a separate file.
+ * cffi (2.1.1)
+ License: MIT-0
+ * charset-normalizer (3.5.1)
+ License: MIT
+ * dnspython (2.8.0)
+ License: ISC
+ * grpcio (1.83.1)
+ License: Apache-2.0
+ * httplib2 (0.32.0)
+ License: MIT
+ * idna (3.19)
+ License: BSD-3-Clause
+ * jmespath (1.1.0)
+ License: MIT
+ * kafka-python (3.0.11)
+ License: Apache-2.0
+ * minio (7.2.20)
+ License: Apache-2.0
+ * numpy (2.5.3)
+ License: BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0
+ * orjson (3.12.0)
+ License: MPL-2.0 AND (Apache-2.0 OR MIT)
+ MPL-2.0 component is ASF Category B; bundled unmodified. See WARN.
+ * pandas (3.0.5)
+ License: BSD-3-Clause
+ * pg8000 (1.31.5)
+ License: BSD-3-Clause
+ * protobuf (7.36.1)
+ License: BSD-3-Clause
+ * pycparser (3.0)
+ License: BSD-3-Clause
+ * pycryptodome (3.23.0)
+ License: BSD-2-Clause AND Public Domain
+ * pymilvus (3.0.1)
+ License: Apache-2.0
+ * pymongo (4.18.0)
+ License: Apache-2.0
+ * pyparsing (3.3.2)
+ License: MIT
+ * python-dateutil (2.9.0.post0)
+ License: Apache-2.0 OR BSD-3-Clause
+ * python-dotenv (1.2.3)
+ License: BSD-3-Clause
+ * pyyaml (6.0.3)
+ License: MIT
+ * redis (8.1.0)
+ License: MIT
+ * requests (2.34.2)
+ License: Apache-2.0
+ * s3transfer (0.19.2)
+ License: Apache-2.0
+ * scramp (1.4.17)
+ License: MIT-0
+ * simplejson (4.1.2)
+ License: MIT OR AFL-2.1
+ Dual-licensed; the MIT option is elected. See WARN.
+ * six (1.17.0)
+ License: MIT
+ * typing-extensions (4.16.0)
+ License: PSF-2.0
+ * urllib3 (2.7.0)
+ License: MIT
+
+Operating-system packages installed by the Dockerfile
+-----------------------------------------------------
+ * python3-lxml ((Debian bookworm))
+ License: BSD-3-Clause
+ * zip ((Debian bookworm))
+ License: Info-ZIP
+
+Action proxy (copied from the common builder image)
+---------------------------------------------------
+ * github.com/google/uuid (v1.6.0)
+ License: BSD-3-Clause
+ * github.com/rs/zerolog (v1.33.0)
+ License: MIT
+ * github.com/stretchr/testify (v1.9.0)
+ License: MIT
+ Test-only dependency.
+ * github.com/davecgh/go-spew (v1.1.1)
+ License: ISC
+ Transitive.
+ * github.com/mattn/go-colorable (v0.1.13)
+ License: MIT
+ Transitive.
+ * github.com/mattn/go-isatty (v0.0.20)
+ License: MIT
+ Transitive.
+ * github.com/pmezard/go-difflib (v1.0.0)
+ License: BSD-3-Clause
+ Transitive.
+ * golang.org/x/sys (v0.26.0)
+ License: BSD-3-Clause
+ Transitive.
+ * gopkg.in/yaml.v3 (v3.0.1)
+ License: Apache-2.0 AND MIT
+ Transitive.
+
+Base operating system image
+---------------------------
+ * (see the FROM line of the Dockerfile) (-)
+ License: mixed; see WARN
+ Operating-system components are supplied by the upstream base image and are not
+ redistributed by the ASF in source form.
+
+------------------------------------------------------------------------------
+Attribution required by bundled components
+------------------------------------------------------------------------------
+
+This product includes software developed by the Apache Software
+Foundation (http://www.apache.org/), including Apache OpenWhisk
+components and Apache-2.0 licensed libraries listed above.
+
+This product includes software developed by third parties under the
+MIT, BSD, ISC, PSF, MPL-2.0 and other licenses, as recorded in LICENSE.
diff --git a/runtime/python/sys/README.md b/runtime/python/sys/README.md
new file mode 100644
index 0000000..df89d07
--- /dev/null
+++ b/runtime/python/sys/README.md
@@ -0,0 +1 @@
+This runtime is used by internal system actions, so ensure it is updated when you update system actions.
\ No newline at end of file
diff --git a/runtime/python/sys/WARN b/runtime/python/sys/WARN
new file mode 100644
index 0000000..5b403db
--- /dev/null
+++ b/runtime/python/sys/WARN
@@ -0,0 +1,108 @@
+==============================================================================
+WARN -- Apache License 2.0 incompatibilities
+Container image: apache/openserverless-runtime-python:sys
+==============================================================================
+
+This file lists third-party components bundled by the Dockerfile beside
+it whose licenses are NOT compatible with the Apache License, Version 2.0,
+together with components that require special handling.
+
+Classification follows the ASF third-party licensing policy:
+
+ https://www.apache.org/legal/resolved.html
+
+ Category A Apache-2.0 compatible. May be included in a release.
+ Category B May be included in BINARY form only, unmodified and as a
+ separate file, with the reciprocal license disclosed.
+ Category X MUST NOT be included in an Apache release artifact.
+
+IMPORTANT SCOPE NOTE
+------------------------------------------------------------------------------
+The Apache release artifact for OpenServerless is the SOURCE distribution,
+which contains this Dockerfile and the files beside it -- all Apache-2.0
+licensed. The published container image is a CONVENIENCE BINARY assembled
+at build time from third-party base images and package repositories.
+Category X components inherited from a base operating system image are
+disclosed below but are not redistributed by the ASF in source form.
+Category X components that this Dockerfile ADDS on purpose must be removed.
+
+
+==============================================================================
+CATEGORY X (AS BUNDLED)
+==============================================================================
+
+ Component : Debian/Ubuntu/Alpine base image userland
+ License : mixed, incl. GPL-2.0/GPL-3.0
+ Category : X (as bundled)
+ Action :
+ The base image contains GPL-licensed operating-system components. The Apache release
+ artifact is the SOURCE (this Dockerfile and the files beside it); the published
+ container image is a convenience binary assembled from third-party base images.
+ No action required beyond this disclosure.
+
+
+==============================================================================
+CATEGORY A
+==============================================================================
+
+ Component : zip / unzip (Info-ZIP)
+ License : Info-ZIP License
+ Category : A
+ Action :
+ BSD-like and Apache-compatible. No action required.
+
+
+==============================================================================
+CATEGORY A (UNDER MIT)
+==============================================================================
+
+ Component : simplejson
+ License : MIT OR AFL-2.1
+ Category : A (under MIT)
+ Action :
+ Dual-licensed. Elect the MIT option, which is Category A. No action required.
+
+
+==============================================================================
+CATEGORY B
+==============================================================================
+
+ Component : certifi
+ License : MPL-2.0
+ Category : B
+ Action :
+ MPL-2.0 is Category B: it may be included in BINARY form only, unmodified
+ and as a separate file, with the reciprocal license disclosed. certifi is
+ installed by pip as an unmodified wheel into site-packages and is not
+ modified or statically linked by this runtime. The published container
+ image is a convenience binary; the Apache SOURCE release does not
+ redistribute it. No action required beyond this disclosure.
+
+ Component : orjson
+ License : MPL-2.0 AND (Apache-2.0 OR MIT)
+ Category : B
+ Action :
+ The MPL-2.0 portion is Category B, handled as for certifi above: installed
+ unmodified as a separate wheel, disclosed here and in LICENSE/NOTICE. The
+ remaining portion is dual-licensed Apache-2.0 OR MIT, both Category A.
+
+
+==============================================================================
+SUMMARY OF REQUIRED REMOVALS (Category X added by this Dockerfile)
+==============================================================================
+
+ None. This Dockerfile adds no Category X component.
+
+==============================================================================
+ADDITIONAL NOTES
+==============================================================================
+
+Base image: python:3.12.14-bookworm (CPython under the PSF License 2.0).
+This is the `sys` runtime variant: a reduced dependency set (see
+requirements.in) intended for OpenServerless system actions.
+The `chess`, `xpdf` and `python3-psycopg2` components flagged in earlier
+revisions of this file are no longer installed by this runtime.
+The pip dependency tree resolved from requirements.txt is far larger than
+the direct requirements listed here; requirements.txt records the full
+pinned closure. Run `pip-licenses` inside the built image for the
+complete inventory before a release audit.
diff --git a/runtime/python/sys/bin/compile b/runtime/python/sys/bin/compile
new file mode 100755
index 0000000..a85d56e
--- /dev/null
+++ b/runtime/python/sys/bin/compile
@@ -0,0 +1,140 @@
+#!/usr/bin/env python3
+"""Python Action Builder
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+"""
+
+from __future__ import print_function
+import os, os.path, sys, ast, shutil, subprocess, traceback
+import importlib, virtualenv
+from os.path import abspath, exists, dirname
+
+# write a file creating intermediate directories
+def write_file(file, body, executable=False):
+ try: os.makedirs(dirname(file), mode=0o755)
+ except: pass
+ with open(file, mode="wb") as f:
+ f.write(body.encode("utf-8"))
+ if executable:
+ os.chmod(file, 0o755)
+
+# copy a file eventually replacing a substring
+def copy_replace(src, dst, match=None, replacement=""):
+ with open(src, 'rb') as s:
+ body = s.read()
+ if match:
+ body = body.decode("utf-8").replace(match, replacement)
+ write_file(dst, body)
+
+# assemble sources
+def sources(launcher, main, src_dir):
+ # move exec in the right place if exists
+ src_file = "%s/exec" % src_dir
+ if exists(src_file):
+ os.rename(src_file, "%s/__main__.py" % src_dir)
+ if exists("%s/__main__.py" % src_dir):
+ os.rename("%s/__main__.py" % src_dir, "%s/main__.py" % src_dir)
+
+ # write the boilerplate in a temp dir
+ copy_replace(launcher, "%s/exec__.py" % src_dir,
+ "from main__ import main as main",
+ "from main__ import %s as main" % main )
+
+# build virtualenv if there is a requirements.txt
+def virtualenv(tgt_dir):
+ # check virtualenv
+ virtualenv_dir = abspath('%s/virtualenv' % tgt_dir)
+ requirements_txt = abspath("%s/requirements.txt" % tgt_dir)
+ if exists(requirements_txt):
+ if not os.path.isdir(virtualenv_dir):
+ cmd = "python -m virtualenv %s >/tmp/err 2>/tmp/err" % virtualenv_dir
+ if os.system(cmd) != 0:
+ with open("/tmp/err", "r") as f:
+ sys.stderr.write(f.read())
+ else:
+ cmd = ". %s/bin/activate && python -m pip install -r %s >/tmp/err 2>/tmp/err" % (virtualenv_dir, requirements_txt)
+ if os.system(cmd) != 0:
+ with open("/tmp/err", "r") as f:
+ sys.stderr.write(f.read())
+ sys.stderr.flush()
+
+# compile sources
+def build(src_dir, tgt_dir):
+ # in general, compile your program into an executable format
+ # for scripting languages, move sources and create a launcher
+ # move away the action dir and replace with the new
+ shutil.rmtree(tgt_dir)
+ shutil.move(src_dir, tgt_dir)
+ tgt_file = "%s/exec" % tgt_dir
+ write_file(tgt_file, """#!/bin/bash
+export PYTHONIOENCODING=UTF-8
+if [[ "$__OW_EXECUTION_ENV" == "" || "$(cat $0.env)" == "$__OW_EXECUTION_ENV" ]]
+then cd "$(dirname $0)"
+ exec /usr/local/bin/python exec__.py "$@"
+else echo "Execution Environment Mismatch"
+ echo "Expected: $(cat $0.env)"
+ echo "Actual: $__OW_EXECUTION_ENV"
+ exit 1
+fi
+""", True)
+ if os.environ.get("__OW_EXECUTION_ENV"):
+ write_file("%s.env"%tgt_file, os.environ['__OW_EXECUTION_ENV'])
+ return tgt_file
+
+#check if a module exists
+def check(tgt_dir, module_name):
+ # activate virtualenv if any
+ path_to_virtualenv = abspath('%s/virtualenv' % tgt_dir)
+ if os.path.isdir(path_to_virtualenv):
+ activate_this_file = path_to_virtualenv + '/bin/activate_this.py'
+ if not os.path.exists(activate_this_file):
+ # check if this was packaged for windows
+ activate_this_file = path_to_virtualenv + '/Scripts/activate_this.py'
+ if os.path.exists(activate_this_file):
+ with open(activate_this_file) as f:
+ code = compile(f.read(), activate_this_file, 'exec')
+ exec(code, dict(__file__=activate_this_file))
+ else:
+ sys.stderr.write("Invalid virtualenv. Zip file does not include 'activate_this.py'.\n")
+ # check module
+ try:
+ sys.path.append(tgt_dir)
+ mod = importlib.util.find_spec(module_name)
+ if mod:
+ with open(mod.origin, "rb") as f:
+ ast.parse(f.read().decode("utf-8"))
+ else:
+ sys.stderr.write("Zip file does not include %s\n" % module_name)
+ except SyntaxError as er:
+ sys.stderr.write(er.msg)
+ except Exception as ex:
+ sys.stderr.write(ex)
+ sys.stderr.flush()
+
+if __name__ == '__main__':
+ if len(sys.argv) < 4:
+ sys.stdout.write("usage: <main-function> <source-dir> <target-dir>\n")
+ sys.stdout.flush()
+ sys.exit(1)
+ launcher = "%s/lib/launcher.py" % dirname(dirname(sys.argv[0]))
+ src_dir = abspath(sys.argv[2])
+ tgt_dir = abspath(sys.argv[3])
+ sources(launcher, sys.argv[1], src_dir)
+ build(abspath(sys.argv[2]), tgt_dir)
+ check(tgt_dir, "main__")
+ sys.stdout.flush()
+ sys.stderr.flush()
diff --git a/runtime/python/sys/lib/launcher.py b/runtime/python/sys/lib/launcher.py
new file mode 100755
index 0000000..ccf0c68
--- /dev/null
+++ b/runtime/python/sys/lib/launcher.py
@@ -0,0 +1,73 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+from __future__ import print_function
+from sys import stdin
+from sys import stdout
+from sys import stderr
+from os import fdopen
+import sys, os, json, traceback, warnings
+
+try:
+ # if the directory 'virtualenv' is extracted out of a zip file
+ path_to_virtualenv = os.path.abspath('./virtualenv')
+ if os.path.isdir(path_to_virtualenv):
+ # activate the virtualenv using activate_this.py contained in the virtualenv
+ activate_this_file = path_to_virtualenv + '/bin/activate_this.py'
+ if not os.path.exists(activate_this_file): # try windows path
+ activate_this_file = path_to_virtualenv + '/Scripts/activate_this.py'
+ if os.path.exists(activate_this_file):
+ with open(activate_this_file) as f:
+ code = compile(f.read(), activate_this_file, 'exec')
+ exec(code, dict(__file__=activate_this_file))
+ else:
+ sys.stderr.write("Invalid virtualenv. Zip file does not include 'activate_this.py'.\n")
+ sys.exit(1)
+except Exception:
+ traceback.print_exc(file=sys.stderr, limit=0)
+ sys.exit(1)
+
+# now import the action as process input/output
+from main__ import main as main
+
+out = fdopen(3, "wb")
+if os.getenv("__OW_WAIT_FOR_ACK", "") != "":
+ out.write(json.dumps({"ok": True}, ensure_ascii=False).encode('utf-8'))
+ out.write(b'\n')
+ out.flush()
+
+env = os.environ
+while True:
+ line = stdin.readline()
+ if not line: break
+ args = json.loads(line)
+ payload = {}
+ for key in args:
+ if key == "value":
+ payload = args["value"]
+ else:
+ env["__OW_%s" % key.upper()]= args[key]
+ res = {}
+ try:
+ res = main(payload)
+ except Exception as ex:
+ print(traceback.format_exc(), file=stderr)
+ res = {"error": str(ex)}
+ out.write(json.dumps(res, ensure_ascii=False).encode('utf-8'))
+ out.write(b'\n')
+ stdout.flush()
+ stderr.flush()
+ out.flush()
diff --git a/runtime/python/sys/requirements.in b/runtime/python/sys/requirements.in
new file mode 100644
index 0000000..98b4d4b
--- /dev/null
+++ b/runtime/python/sys/requirements.in
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+pymilvus
+redis
+httplib2
+kafka_python
+python-dateutil
+requests
+simplejson
+pyyaml
+boto3
+pg8000
+pymongo
+minio
+bcrypt
diff --git a/runtime/python/sys/requirements.txt b/runtime/python/sys/requirements.txt
new file mode 100644
index 0000000..381bda9
--- /dev/null
+++ b/runtime/python/sys/requirements.txt
@@ -0,0 +1,99 @@
+#
+# This file is autogenerated by pip-compile with Python 3.12
+# by the following command:
+#
+# pip-compile --no-index requirements.in
+#
+argon2-cffi==25.1.0
+ # via minio
+argon2-cffi-bindings==26.1.0
+ # via argon2-cffi
+asn1crypto==1.5.1
+ # via scramp
+bcrypt==5.0.0
+ # via -r requirements.in
+boto3==1.43.89
+ # via -r requirements.in
+botocore==1.43.89
+ # via
+ # boto3
+ # s3transfer
+cachetools==7.1.8
+ # via pymilvus
+certifi==2026.7.22
+ # via
+ # minio
+ # requests
+cffi==2.1.1
+ # via argon2-cffi-bindings
+charset-normalizer==3.5.1
+ # via requests
+dnspython==2.8.0
+ # via pymongo
+grpcio==1.83.1
+ # via pymilvus
+httplib2==0.32.0
+ # via -r requirements.in
+idna==3.19
+ # via requests
+jmespath==1.1.0
+ # via
+ # boto3
+ # botocore
+kafka-python==3.0.11
+ # via -r requirements.in
+minio==7.2.20
+ # via -r requirements.in
+numpy==2.5.3
+ # via pandas
+orjson==3.12.0
+ # via pymilvus
+pandas==3.0.5
+ # via pymilvus
+pg8000==1.31.5
+ # via -r requirements.in
+protobuf==7.36.1
+ # via pymilvus
+pycparser==3.0
+ # via cffi
+pycryptodome==3.23.0
+ # via minio
+pymilvus==3.0.1
+ # via -r requirements.in
+pymongo==4.18.0
+ # via -r requirements.in
+pyparsing==3.3.2
+ # via httplib2
+python-dateutil==2.9.0.post0
+ # via
+ # -r requirements.in
+ # botocore
+ # pandas
+ # pg8000
+python-dotenv==1.2.3
+ # via pymilvus
+pyyaml==6.0.3
+ # via -r requirements.in
+redis==8.1.0
+ # via -r requirements.in
+requests==2.34.2
+ # via
+ # -r requirements.in
+ # pymilvus
+s3transfer==0.19.2
+ # via boto3
+scramp==1.4.17
+ # via pg8000
+simplejson==4.1.2
+ # via -r requirements.in
+six==1.17.0
+ # via python-dateutil
+typing-extensions==4.16.0
+ # via
+ # grpcio
+ # minio
+urllib3==2.7.0
+ # via
+ # botocore
+ # minio
+ # requests
diff --git a/runtimes.py b/runtimes.py
index 00a1eec..98fd261 100755
--- a/runtimes.py
+++ b/runtimes.py
@@ -19,9 +19,11 @@
Each runtime/<language>/<version> directory becomes one kind: the language
directory gives the kind family, the version subdir gives both the kind
- version and the image tag, with -<tag> appended. A merge.json in a version
- directory is merged into that entry, which is how defaults, stemCells and
- requireMain are declared.
+ version and the image tag, with -<tag> appended. A leading `v` is optional
+ and stripped from the kind, so runtime/python/v3.12 yields python:3.12 and
+ runtime/python/sys yields python:sys. A merge.json in a version directory is
+ merged into that entry, which is how defaults, stemCells and requireMain are
+ declared.
Example:
./runtime.py all_26i06r36-snapshot
@@ -71,8 +73,18 @@ def strip_prefix(tag):
def version_key(version):
- """Sort v3.11/v1.27/v8 numerically, newest first, so ordering is stable."""
- return [int(p) if p.isdigit() else p for p in version.lstrip("v").split(".")]
+ """Sort v3.11/v1.27/v8 numerically, newest first, so ordering is stable.
+
+ Named variants such as `sys` carry no version number; they sort after the
+ numbered ones. Every component is compared as a (rank, value) pair so a
+ numbered part never has to compare against a textual one.
+ """
+ numbered = version.startswith("v")
+ parts = [
+ (0, p.zfill(8)) if p.isdigit() else (1, p)
+ for p in version.lstrip("v").split(".")
+ ]
+ return [(0,) if numbered else (1,), parts]
def kind_entry(language, version, tag, prefix):
@@ -102,7 +114,8 @@ def walk(runtime_dir, tag, prefix):
(
d
for d in os.listdir(lang_dir)
- if d.startswith("v") and os.path.isdir(os.path.join(lang_dir, d))
+ if not d.startswith(".")
+ and os.path.isdir(os.path.join(lang_dir, d))
),
key=version_key,
reverse=True,