diff --git a/.github/config/image/lambda/base-preview.yml b/.github/config/image/lambda/base-preview.yml index 81fb1d952938..07c0dd51b8da 100644 --- a/.github/config/image/lambda/base-preview.yml +++ b/.github/config/image/lambda/base-preview.yml @@ -1,6 +1,6 @@ image: name: "lambda-base-preview" - description: "Lambda base GPU image with thread-mode RIC preview" + description: "Lambda base GPU image with multi-mode concurrency RIC" metadata: framework: "lambda" @@ -19,6 +19,8 @@ build: cuda_version: "12.9.1" dlc_major_version: "1" dlc_minor_version: "0" + awslambdaric_version: "3.1.1" + awslambdaric_release: "2.0.0.0" release: release: true diff --git a/.github/config/image/lambda/cupy-preview.yml b/.github/config/image/lambda/cupy-preview.yml index 66be90f22839..f852f7b4cada 100644 --- a/.github/config/image/lambda/cupy-preview.yml +++ b/.github/config/image/lambda/cupy-preview.yml @@ -1,6 +1,6 @@ image: name: "lambda-cupy-preview" - description: "Lambda CuPy GPU image with thread-mode RIC preview" + description: "Lambda CuPy GPU image with multi-mode concurrency RIC" metadata: framework: "lambda" @@ -19,6 +19,8 @@ build: cuda_version: "12.9.1" dlc_major_version: "1" dlc_minor_version: "0" + awslambdaric_version: "3.1.1" + awslambdaric_release: "2.0.0.0" release: release: true diff --git a/.github/config/image/lambda/pytorch-preview.yml b/.github/config/image/lambda/pytorch-preview.yml index ed80993ab729..dc20dd995435 100644 --- a/.github/config/image/lambda/pytorch-preview.yml +++ b/.github/config/image/lambda/pytorch-preview.yml @@ -1,6 +1,6 @@ image: name: "lambda-pytorch-preview" - description: "Lambda PyTorch GPU image with thread-mode RIC preview" + description: "Lambda PyTorch GPU image with multi-mode concurrency RIC" metadata: framework: "lambda" @@ -19,6 +19,8 @@ build: cuda_version: "12.9.1" dlc_major_version: "1" dlc_minor_version: "0" + awslambdaric_version: "3.1.1" + awslambdaric_release: "2.0.0.0" release: release: true diff --git a/.github/workflows/lambda.pipeline.yml b/.github/workflows/lambda.pipeline.yml index 9c549414313f..c44fafcf0bd8 100644 --- a/.github/workflows/lambda.pipeline.yml +++ b/.github/workflows/lambda.pipeline.yml @@ -158,6 +158,12 @@ jobs: TESTS="$COMMON /test/unit/test_imports_base.py" ;; esac echo "tests=${TESTS}" >> $GITHUB_OUTPUT + # Multi-mode RIC targets carry a runtime concurrency-mode knob. + if [[ "$TARGET" == *preview* ]]; then + echo "multimode=true" >> $GITHUB_OUTPUT + else + echo "multimode=false" >> $GITHUB_OUTPUT + fi - name: Run GPU validation tests if: steps.check.outputs.exists == 'true' @@ -167,9 +173,19 @@ jobs: ${{ steps.image.outputs.image-uri }} \ -m pytest ${{ steps.config.outputs.tests }} -v - - name: Skip notice - if: steps.check.outputs.exists != 'true' - run: echo "Image not found in ECR — skipping tests (first release scenario)" + - name: Verify runtime concurrency-mode override + if: steps.check.outputs.exists == 'true' && steps.config.outputs.multimode == 'true' + run: | + for mode in process thread hybrid; do + echo "::group::override AWS_LAMBDA_CONCURRENCY_MODE=${mode}" + docker run --rm --gpus all --entrypoint python \ + -e AWS_LAMBDA_CONCURRENCY_MODE=${mode} \ + -e EXPECTED_CONCURRENCY_MODE=${mode} \ + -v $(pwd)/test/lambda:/test \ + ${{ steps.image.outputs.image-uri }} \ + -m pytest /test/unit/test_lambda_runtime.py::test_ric_resolves_container_env -v + echo "::endgroup::" + done release-gate: if: >- diff --git a/docker/lambda/Dockerfile b/docker/lambda/Dockerfile index 26a5c0ebd843..6dc54d0dfb36 100644 --- a/docker/lambda/Dockerfile +++ b/docker/lambda/Dockerfile @@ -144,13 +144,13 @@ RUN --mount=type=cache,target=/root/.cache/uv \ # ============================================================ FROM nvidia/cuda:${CUDA_VERSION}-runtime-amzn2023 as oss-base-py3 COPY --from=builder-base-py3 /var/lang /var/lang -COPY ./scripts/common/setup_oss_compliance.sh /tmp/setup_oss_compliance.sh +COPY ./scripts/docker/common/setup_oss_compliance.sh /tmp/setup_oss_compliance.sh RUN PATH="/var/lang/bin:$PATH" bash /tmp/setup_oss_compliance.sh python3 \ && touch /root/THIRD_PARTY_SOURCE_CODE_URLS FROM nvidia/cuda:${CUDA_VERSION}-runtime-amzn2023 as oss-cupy-py3 COPY --from=builder-cupy-py3 /var/lang /var/lang -COPY ./scripts/common/setup_oss_compliance.sh /tmp/setup_oss_compliance.sh +COPY ./scripts/docker/common/setup_oss_compliance.sh /tmp/setup_oss_compliance.sh RUN PATH="/var/lang/bin:$PATH" bash /tmp/setup_oss_compliance.sh python3 \ && touch /root/THIRD_PARTY_SOURCE_CODE_URLS @@ -158,7 +158,7 @@ FROM nvidia/cuda:${CUDA_VERSION}-runtime-amzn2023 as oss-pytorch-py3 ARG FFMPEG_VERSION COPY --from=builder-pytorch-py3 /var/lang /var/lang COPY --from=lambda-python /lib64/libssl.so.3 /lib64/libcrypto.so.3 /lib64/ -COPY ./scripts/common/setup_oss_compliance.sh /tmp/setup_oss_compliance.sh +COPY ./scripts/docker/common/setup_oss_compliance.sh /tmp/setup_oss_compliance.sh RUN PATH="/var/lang/bin:$PATH" bash /tmp/setup_oss_compliance.sh python3 \ && printf '\n** FFmpeg; version n%s -- https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n%s.tar.gz\n' "${FFMPEG_VERSION}" "${FFMPEG_VERSION}" >> /root/BUILD_FROM_SOURCE_PACKAGES_LICENCES \ && printf '\nFFmpeg n%s https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n%s.tar.gz\n' "${FFMPEG_VERSION}" "${FFMPEG_VERSION}" >> /root/THIRD_PARTY_SOURCE_CODE_URLS \ @@ -192,8 +192,8 @@ ENV PATH="/var/lang/bin:$PATH" \ LAMBDA_RUNTIME_DIR=/var/runtime \ LANG=en_US.UTF-8 \ TZ=:/etc/localtime -COPY ./scripts/telemetry/deep_learning_container.py /usr/local/bin/deep_learning_container.py -COPY ./scripts/telemetry/bash_telemetry.sh.template /tmp/bash_telemetry.sh.template +COPY ./scripts/docker/telemetry/deep_learning_container.py /usr/local/bin/deep_learning_container.py +COPY ./scripts/docker/telemetry/bash_telemetry.sh.template /tmp/bash_telemetry.sh.template ARG FRAMEWORK ARG FRAMEWORK_VERSION ARG CONTAINER_TYPE @@ -244,8 +244,8 @@ ENV PATH="/var/lang/bin:$PATH" \ LAMBDA_RUNTIME_DIR=/var/runtime \ LANG=en_US.UTF-8 \ TZ=:/etc/localtime -COPY ./scripts/telemetry/deep_learning_container.py /usr/local/bin/deep_learning_container.py -COPY ./scripts/telemetry/bash_telemetry.sh.template /tmp/bash_telemetry.sh.template +COPY ./scripts/docker/telemetry/deep_learning_container.py /usr/local/bin/deep_learning_container.py +COPY ./scripts/docker/telemetry/bash_telemetry.sh.template /tmp/bash_telemetry.sh.template ARG FRAMEWORK ARG FRAMEWORK_VERSION @@ -304,8 +304,8 @@ ENV PATH="/var/lang/bin:/usr/local/bin:$PATH" \ LAMBDA_RUNTIME_DIR=/var/runtime \ LANG=en_US.UTF-8 \ TZ=:/etc/localtime -COPY ./scripts/telemetry/deep_learning_container.py /usr/local/bin/deep_learning_container.py -COPY ./scripts/telemetry/bash_telemetry.sh.template /tmp/bash_telemetry.sh.template +COPY ./scripts/docker/telemetry/deep_learning_container.py /usr/local/bin/deep_learning_container.py +COPY ./scripts/docker/telemetry/bash_telemetry.sh.template /tmp/bash_telemetry.sh.template ARG FRAMEWORK ARG FRAMEWORK_VERSION ARG CONTAINER_TYPE @@ -330,7 +330,7 @@ ENTRYPOINT ["/lambda_entrypoint.sh", "python", "-m", "awslambdaric"] CMD ["handler.handler"] # ============================================================ -# RIC preview builder (compile thread-mode RIC with C extensions) +# RIC builder (compile multi-mode concurrency RIC with C extensions) # ============================================================ FROM builder-base as builder-ric-preview ARG PYTHON_VERSION @@ -349,31 +349,46 @@ RUN uv pip install --python /var/lang/bin/python${PYTHON_VERSION} --no-deps /tmp && rm /tmp/awslambdaric-${AWSLAMBDARIC_VERSION}.tar.gz # ============================================================ -# Preview: Base Python 3.13 (+ thread-mode RIC) +# Base Python 3.13 (+ multi-mode concurrency RIC) # ============================================================ FROM base-py3 as base-preview-py3 ARG PYTHON_VERSION RUN rm -rf /var/lang/lib/python${PYTHON_VERSION}/site-packages/awslambdaric* \ && rm -f /var/lang/lib/python${PYTHON_VERSION}/site-packages/runtime_client*.so COPY --from=builder-ric-preview /var/lang/lib/python${PYTHON_VERSION}/site-packages/ /var/lang/lib/python${PYTHON_VERSION}/site-packages/ -ENV AWS_LAMBDA_CONCURRENCY_MODE=thread +# Default: process mode (RIC-native). Customers override per function at runtime +# to thread (one shared model copy in GPU VRAM) or hybrid; function-config env +# vars take precedence over this image default. In process/hybrid, VRAM scales +# with worker count (one model copy + CUDA context per process) — size function +# concurrency to the model's VRAM footprint. +ENV AWS_LAMBDA_CONCURRENCY_MODE=process # ============================================================ -# Preview: CuPy Python 3.13 (+ thread-mode RIC) +# CuPy Python 3.13 (+ multi-mode concurrency RIC) # ============================================================ FROM cupy-py3 as cupy-preview-py3 ARG PYTHON_VERSION RUN rm -rf /var/lang/lib/python${PYTHON_VERSION}/site-packages/awslambdaric* \ && rm -f /var/lang/lib/python${PYTHON_VERSION}/site-packages/runtime_client*.so COPY --from=builder-ric-preview /var/lang/lib/python${PYTHON_VERSION}/site-packages/ /var/lang/lib/python${PYTHON_VERSION}/site-packages/ -ENV AWS_LAMBDA_CONCURRENCY_MODE=thread +# Default: process mode (RIC-native). Customers override per function at runtime +# to thread (one shared model copy in GPU VRAM) or hybrid; function-config env +# vars take precedence over this image default. In process/hybrid, VRAM scales +# with worker count (one model copy + CUDA context per process) — size function +# concurrency to the model's VRAM footprint. +ENV AWS_LAMBDA_CONCURRENCY_MODE=process # ============================================================ -# Preview: PyTorch Python 3.13 (+ thread-mode RIC) +# PyTorch Python 3.13 (+ multi-mode concurrency RIC) # ============================================================ FROM pytorch-py3 as pytorch-preview-py3 ARG PYTHON_VERSION RUN rm -rf /var/lang/lib/python${PYTHON_VERSION}/site-packages/awslambdaric* \ && rm -f /var/lang/lib/python${PYTHON_VERSION}/site-packages/runtime_client*.so COPY --from=builder-ric-preview /var/lang/lib/python${PYTHON_VERSION}/site-packages/ /var/lang/lib/python${PYTHON_VERSION}/site-packages/ -ENV AWS_LAMBDA_CONCURRENCY_MODE=thread \ No newline at end of file +# Default: process mode (RIC-native). Customers override per function at runtime +# to thread (one shared model copy in GPU VRAM) or hybrid; function-config env +# vars take precedence over this image default. In process/hybrid, VRAM scales +# with worker count (one model copy + CUDA context per process) — size function +# concurrency to the model's VRAM footprint. +ENV AWS_LAMBDA_CONCURRENCY_MODE=process \ No newline at end of file diff --git a/docker/lambda/pytorch/pyproject.toml b/docker/lambda/pytorch/pyproject.toml index 957f75a28897..0b925ae62987 100644 --- a/docker/lambda/pytorch/pyproject.toml +++ b/docker/lambda/pytorch/pyproject.toml @@ -7,11 +7,13 @@ dependencies = [ "av==16.1.0", "awslambdaric==4.0.0", "boto3==1.40.4", + "click==8.3.3", "diffusers==0.38.0", "librosa==0.11.0", + "msgpack==1.2.1", "numpy==2.4.2", "opencv-python-headless==4.13.0.92", - "pillow==12.2.0", + "pillow==12.3.0", "pip==26.0.1", "pip-licenses==5.5.1", "requests==2.33.0", @@ -24,7 +26,7 @@ dependencies = [ "torch==2.10.0", "torchaudio==2.10.0", "torchvision==0.25.0", - "transformers==5.2.0", + "transformers==5.5.0", "urllib3==2.7.0", "pytest==8.4.1", ] diff --git a/docker/lambda/pytorch/uv.lock b/docker/lambda/pytorch/uv.lock index b17657a1a211..c3810c0c1567 100644 --- a/docker/lambda/pytorch/uv.lock +++ b/docker/lambda/pytorch/uv.lock @@ -225,14 +225,14 @@ wheels = [ [[package]] name = "click" -version = "8.3.1" +version = "8.3.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } +sdist = { url = "https://files.pythonhosted.org/packages/bb/63/f9e1ea081ce35720d8b92acde70daaedace594dc93b693c869e0d5910718/click-8.3.3.tar.gz", hash = "sha256:398329ad4837b2ff7cbe1dd166a4c0f8900c3ca3a218de04466f38f6497f18a2", size = 328061, upload-time = "2026-04-22T15:11:27.506Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, + { url = "https://files.pythonhosted.org/packages/ae/44/c1221527f6a71a01ec6fbad7fa78f1d50dfa02217385cf0fa3eec7087d59/click-8.3.3-py3-none-any.whl", hash = "sha256:a2bf429bb3033c89fa4936ffb35d5cb471e3719e1f3c8a7c3fff0b8314305613", size = 110502, upload-time = "2026-04-22T15:11:25.044Z" }, ] [[package]] @@ -488,8 +488,10 @@ dependencies = [ { name = "av" }, { name = "awslambdaric" }, { name = "boto3" }, + { name = "click" }, { name = "diffusers" }, { name = "librosa" }, + { name = "msgpack" }, { name = "numpy" }, { name = "opencv-python-headless" }, { name = "pillow" }, @@ -516,11 +518,13 @@ requires-dist = [ { name = "av", specifier = "==16.1.0" }, { name = "awslambdaric", specifier = "==4.0.0" }, { name = "boto3", specifier = "==1.40.4" }, + { name = "click", specifier = "==8.3.3" }, { name = "diffusers", specifier = "==0.38.0" }, { name = "librosa", specifier = "==0.11.0" }, + { name = "msgpack", specifier = "==1.2.1" }, { name = "numpy", specifier = "==2.4.2" }, { name = "opencv-python-headless", specifier = "==4.13.0.92" }, - { name = "pillow", specifier = "==12.2.0" }, + { name = "pillow", specifier = "==12.3.0" }, { name = "pip", specifier = "==26.0.1" }, { name = "pip-licenses", specifier = "==5.5.1" }, { name = "pytest", specifier = "==8.4.1" }, @@ -534,7 +538,7 @@ requires-dist = [ { name = "torch", specifier = "==2.10.0", index = "https://download.pytorch.org/whl/cu129" }, { name = "torchaudio", specifier = "==2.10.0", index = "https://download.pytorch.org/whl/cu129" }, { name = "torchvision", specifier = "==0.25.0", index = "https://download.pytorch.org/whl/cu129" }, - { name = "transformers", specifier = "==5.2.0" }, + { name = "transformers", specifier = "==5.5.0" }, { name = "urllib3", specifier = "==2.7.0" }, ] @@ -650,19 +654,21 @@ wheels = [ [[package]] name = "msgpack" -version = "1.1.2" +version = "1.2.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4d/f2/bfb55a6236ed8725a96b0aa3acbd0ec17588e6a2c3b62a93eb513ed8783f/msgpack-1.1.2.tar.gz", hash = "sha256:3b60763c1373dd60f398488069bcdc703cd08a711477b5d480eecc9f9626f47e", size = 173581, upload-time = "2025-10-08T09:15:56.596Z" } +sdist = { url = "https://files.pythonhosted.org/packages/31/f9/c0a1c127f9049db9155afc316952ea571720dd01833ff5e4d7e8e6352dbb/msgpack-1.2.1.tar.gz", hash = "sha256:04c721c2c7448767e9e3f2520a475663d8ee0f09c31890f6d2bd70fd636a9647", size = 183960, upload-time = "2026-06-18T16:13:52.594Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6b/31/b46518ecc604d7edf3a4f94cb3bf021fc62aa301f0cb849936968164ef23/msgpack-1.1.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:4efd7b5979ccb539c221a4c4e16aac1a533efc97f3b759bb5a5ac9f6d10383bf", size = 81212, upload-time = "2025-10-08T09:15:14.552Z" }, - { url = "https://files.pythonhosted.org/packages/92/dc/c385f38f2c2433333345a82926c6bfa5ecfff3ef787201614317b58dd8be/msgpack-1.1.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:42eefe2c3e2af97ed470eec850facbe1b5ad1d6eacdbadc42ec98e7dcf68b4b7", size = 84315, upload-time = "2025-10-08T09:15:15.543Z" }, - { url = "https://files.pythonhosted.org/packages/d3/68/93180dce57f684a61a88a45ed13047558ded2be46f03acb8dec6d7c513af/msgpack-1.1.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1fdf7d83102bf09e7ce3357de96c59b627395352a4024f6e2458501f158bf999", size = 412721, upload-time = "2025-10-08T09:15:16.567Z" }, - { url = "https://files.pythonhosted.org/packages/5d/ba/459f18c16f2b3fc1a1ca871f72f07d70c07bf768ad0a507a698b8052ac58/msgpack-1.1.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fac4be746328f90caa3cd4bc67e6fe36ca2bf61d5c6eb6d895b6527e3f05071e", size = 424657, upload-time = "2025-10-08T09:15:17.825Z" }, - { url = "https://files.pythonhosted.org/packages/38/f8/4398c46863b093252fe67368b44edc6c13b17f4e6b0e4929dbf0bdb13f23/msgpack-1.1.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:fffee09044073e69f2bad787071aeec727183e7580443dfeb8556cbf1978d162", size = 402668, upload-time = "2025-10-08T09:15:19.003Z" }, - { url = "https://files.pythonhosted.org/packages/28/ce/698c1eff75626e4124b4d78e21cca0b4cc90043afb80a507626ea354ab52/msgpack-1.1.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5928604de9b032bc17f5099496417f113c45bc6bc21b5c6920caf34b3c428794", size = 419040, upload-time = "2025-10-08T09:15:20.183Z" }, - { url = "https://files.pythonhosted.org/packages/67/32/f3cd1667028424fa7001d82e10ee35386eea1408b93d399b09fb0aa7875f/msgpack-1.1.2-cp313-cp313-win32.whl", hash = "sha256:a7787d353595c7c7e145e2331abf8b7ff1e6673a6b974ded96e6d4ec09f00c8c", size = 65037, upload-time = "2025-10-08T09:15:21.416Z" }, - { url = "https://files.pythonhosted.org/packages/74/07/1ed8277f8653c40ebc65985180b007879f6a836c525b3885dcc6448ae6cb/msgpack-1.1.2-cp313-cp313-win_amd64.whl", hash = "sha256:a465f0dceb8e13a487e54c07d04ae3ba131c7c5b95e2612596eafde1dccf64a9", size = 72631, upload-time = "2025-10-08T09:15:22.431Z" }, - { url = "https://files.pythonhosted.org/packages/e5/db/0314e4e2db56ebcf450f277904ffd84a7988b9e5da8d0d61ab2d057df2b6/msgpack-1.1.2-cp313-cp313-win_arm64.whl", hash = "sha256:e69b39f8c0aa5ec24b57737ebee40be647035158f14ed4b40e6f150077e21a84", size = 64118, upload-time = "2025-10-08T09:15:23.402Z" }, + { url = "https://files.pythonhosted.org/packages/b0/ac/dcddcab6f6c20ecb387ca5e980371cdb3f87ff69aeca388be97eebc4c074/msgpack-1.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:0a70e3cf2804a300d921bb0940426e35f4e489a23adfb77a808892241db0a064", size = 83151, upload-time = "2026-06-18T16:13:12.173Z" }, + { url = "https://files.pythonhosted.org/packages/64/71/fbcfa83a1d6a9c6091942d1cfd070962244664b87427a9a49a6897b1b219/msgpack-1.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:491cc39455ca765fad51fb451bf2915eb2cf41192ab5801ce8d67c1d614fe056", size = 82351, upload-time = "2026-06-18T16:13:13.194Z" }, + { url = "https://files.pythonhosted.org/packages/e3/10/ddf7b06db879e8792d13934ddda09ff20bd2a583fd84c9b59aae9b0e650b/msgpack-1.2.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f310233ef7fb9c14e201c93639fe5f5260b005f56f0b29048e999c30935596cc", size = 407518, upload-time = "2026-06-18T16:13:14.233Z" }, + { url = "https://files.pythonhosted.org/packages/79/d3/36a46a8ed992b781acbc05928bd5bee3c810cb0c3563bf81a7b0c04a1a76/msgpack-1.2.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:787c9bebb5833e8f6fc8abca3c0597683d8d87f56a8842b6b89c75a5f3176e2d", size = 416405, upload-time = "2026-06-18T16:13:15.435Z" }, + { url = "https://files.pythonhosted.org/packages/f9/84/e8e9598b557c0ba6ddae901a73780a4c75ac667dddf59414b1e56a42fb34/msgpack-1.2.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dc871b997a9370d855b7394465f2f350e847a5b806dd38dcc9c989e7d87da155", size = 376257, upload-time = "2026-06-18T16:13:17.022Z" }, + { url = "https://files.pythonhosted.org/packages/40/16/738fe6d875ad7e2a9429c165322a4ec088f4f273cdfae63d96a89c467961/msgpack-1.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:85f57e960d877f2977f6430896191b04a21f8901b3b4baf2e4604329f4db5402", size = 397469, upload-time = "2026-06-18T16:13:18.287Z" }, + { url = "https://files.pythonhosted.org/packages/ca/be/6d5952df75a7f24f35833af764c3a6860780364cb3a0030beb8099e1b2b4/msgpack-1.2.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:1233ee2dd0cefba127583de50ea654677277047d238303521db35def3d7b2e7c", size = 372802, upload-time = "2026-06-18T16:13:19.685Z" }, + { url = "https://files.pythonhosted.org/packages/e1/39/e2ef7dbf0473bcb8dc7c50bf782a892d67414877b63e47fc88eb189ef5e6/msgpack-1.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e3dc2feb0876209d9c38aa56cb1de169bd6c4348f1aa48271f241226590993e6", size = 411273, upload-time = "2026-06-18T16:13:21.028Z" }, + { url = "https://files.pythonhosted.org/packages/ef/c5/133f4512a56e983a93445c836c9d94d88f3bc2e0980ff4b9e577bd8416ce/msgpack-1.2.1-cp313-cp313-win32.whl", hash = "sha256:6d09badf350af2be9d189184e04e64cf54ad93569ab3d96fca58bd3e84aad707", size = 64471, upload-time = "2026-06-18T16:13:22.293Z" }, + { url = "https://files.pythonhosted.org/packages/e2/98/577e10b055096a7dd40732358cabaf7180a20c79ed1dcdbb618e4b9deac7/msgpack-1.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:33f14fba63278b714efe6ad07e50ea5f03d91537aa6a1c5f1ceca4cf44013ca9", size = 71274, upload-time = "2026-06-18T16:13:23.455Z" }, + { url = "https://files.pythonhosted.org/packages/ba/ee/0c0048e7cfbef23c6a94791b8959ab28155232e7956de8a305b5ff588f05/msgpack-1.2.1-cp313-cp313-win_arm64.whl", hash = "sha256:afc5febcd4c99effbc02b528e49d6fd0760b2b7d48c05239e345a5fa6e743d9a", size = 64795, upload-time = "2026-06-18T16:13:24.687Z" }, ] [[package]] @@ -910,35 +916,22 @@ wheels = [ [[package]] name = "pillow" -version = "12.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8c/21/c2bcdd5906101a30244eaffc1b6e6ce71a31bd0742a01eb89e660ebfac2d/pillow-12.2.0.tar.gz", hash = "sha256:a830b1a40919539d07806aa58e1b114df53ddd43213d9c8b75847eee6c0182b5", size = 46987819, upload-time = "2026-04-01T14:46:17.687Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4a/01/53d10cf0dbad820a8db274d259a37ba50b88b24768ddccec07355382d5ad/pillow-12.2.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:8297651f5b5679c19968abefd6bb84d95fe30ef712eb1b2d9b2d31ca61267f4c", size = 4100837, upload-time = "2026-04-01T14:43:41.506Z" }, - { url = "https://files.pythonhosted.org/packages/0f/98/f3a6657ecb698c937f6c76ee564882945f29b79bad496abcba0e84659ec5/pillow-12.2.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:50d8520da2a6ce0af445fa6d648c4273c3eeefbc32d7ce049f22e8b5c3daecc2", size = 4176528, upload-time = "2026-04-01T14:43:43.773Z" }, - { url = "https://files.pythonhosted.org/packages/69/bc/8986948f05e3ea490b8442ea1c1d4d990b24a7e43d8a51b2c7d8b1dced36/pillow-12.2.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:766cef22385fa1091258ad7e6216792b156dc16d8d3fa607e7545b2b72061f1c", size = 3640401, upload-time = "2026-04-01T14:43:45.87Z" }, - { url = "https://files.pythonhosted.org/packages/34/46/6c717baadcd62bc8ed51d238d521ab651eaa74838291bda1f86fe1f864c9/pillow-12.2.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5d2fd0fa6b5d9d1de415060363433f28da8b1526c1c129020435e186794b3795", size = 5308094, upload-time = "2026-04-01T14:43:48.438Z" }, - { url = "https://files.pythonhosted.org/packages/71/43/905a14a8b17fdb1ccb58d282454490662d2cb89a6bfec26af6d3520da5ec/pillow-12.2.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:56b25336f502b6ed02e889f4ece894a72612fe885889a6e8c4c80239ff6e5f5f", size = 4695402, upload-time = "2026-04-01T14:43:51.292Z" }, - { url = "https://files.pythonhosted.org/packages/73/dd/42107efcb777b16fa0393317eac58f5b5cf30e8392e266e76e51cff28c3d/pillow-12.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f1c943e96e85df3d3478f7b691f229887e143f81fedab9b20205349ab04d73ed", size = 6280005, upload-time = "2026-04-01T14:43:54.242Z" }, - { url = "https://files.pythonhosted.org/packages/a8/68/b93e09e5e8549019e61acf49f65b1a8530765a7f812c77a7461bca7e4494/pillow-12.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:03f6fab9219220f041c74aeaa2939ff0062bd5c364ba9ce037197f4c6d498cd9", size = 8090669, upload-time = "2026-04-01T14:43:57.335Z" }, - { url = "https://files.pythonhosted.org/packages/4b/6e/3ccb54ce8ec4ddd1accd2d89004308b7b0b21c4ac3d20fa70af4760a4330/pillow-12.2.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5cdfebd752ec52bf5bb4e35d9c64b40826bc5b40a13df7c3cda20a2c03a0f5ed", size = 6395194, upload-time = "2026-04-01T14:43:59.864Z" }, - { url = "https://files.pythonhosted.org/packages/67/ee/21d4e8536afd1a328f01b359b4d3997b291ffd35a237c877b331c1c3b71c/pillow-12.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eedf4b74eda2b5a4b2b2fb4c006d6295df3bf29e459e198c90ea48e130dc75c3", size = 7082423, upload-time = "2026-04-01T14:44:02.74Z" }, - { url = "https://files.pythonhosted.org/packages/78/5f/e9f86ab0146464e8c133fe85df987ed9e77e08b29d8d35f9f9f4d6f917ba/pillow-12.2.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:00a2865911330191c0b818c59103b58a5e697cae67042366970a6b6f1b20b7f9", size = 6505667, upload-time = "2026-04-01T14:44:05.381Z" }, - { url = "https://files.pythonhosted.org/packages/ed/1e/409007f56a2fdce61584fd3acbc2bbc259857d555196cedcadc68c015c82/pillow-12.2.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:1e1757442ed87f4912397c6d35a0db6a7b52592156014706f17658ff58bbf795", size = 7208580, upload-time = "2026-04-01T14:44:08.39Z" }, - { url = "https://files.pythonhosted.org/packages/23/c4/7349421080b12fb35414607b8871e9534546c128a11965fd4a7002ccfbee/pillow-12.2.0-cp313-cp313-win32.whl", hash = "sha256:144748b3af2d1b358d41286056d0003f47cb339b8c43a9ea42f5fea4d8c66b6e", size = 6375896, upload-time = "2026-04-01T14:44:11.197Z" }, - { url = "https://files.pythonhosted.org/packages/3f/82/8a3739a5e470b3c6cbb1d21d315800d8e16bff503d1f16b03a4ec3212786/pillow-12.2.0-cp313-cp313-win_amd64.whl", hash = "sha256:390ede346628ccc626e5730107cde16c42d3836b89662a115a921f28440e6a3b", size = 7081266, upload-time = "2026-04-01T14:44:13.947Z" }, - { url = "https://files.pythonhosted.org/packages/c3/25/f968f618a062574294592f668218f8af564830ccebdd1fa6200f598e65c5/pillow-12.2.0-cp313-cp313-win_arm64.whl", hash = "sha256:8023abc91fba39036dbce14a7d6535632f99c0b857807cbbbf21ecc9f4717f06", size = 2463508, upload-time = "2026-04-01T14:44:16.312Z" }, - { url = "https://files.pythonhosted.org/packages/4d/a4/b342930964e3cb4dce5038ae34b0eab4653334995336cd486c5a8c25a00c/pillow-12.2.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:042db20a421b9bafecc4b84a8b6e444686bd9d836c7fd24542db3e7df7baad9b", size = 5309927, upload-time = "2026-04-01T14:44:18.89Z" }, - { url = "https://files.pythonhosted.org/packages/9f/de/23198e0a65a9cf06123f5435a5d95cea62a635697f8f03d134d3f3a96151/pillow-12.2.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:dd025009355c926a84a612fecf58bb315a3f6814b17ead51a8e48d3823d9087f", size = 4698624, upload-time = "2026-04-01T14:44:21.115Z" }, - { url = "https://files.pythonhosted.org/packages/01/a6/1265e977f17d93ea37aa28aa81bad4fa597933879fac2520d24e021c8da3/pillow-12.2.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:88ddbc66737e277852913bd1e07c150cc7bb124539f94c4e2df5344494e0a612", size = 6321252, upload-time = "2026-04-01T14:44:23.663Z" }, - { url = "https://files.pythonhosted.org/packages/3c/83/5982eb4a285967baa70340320be9f88e57665a387e3a53a7f0db8231a0cd/pillow-12.2.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d362d1878f00c142b7e1a16e6e5e780f02be8195123f164edf7eddd911eefe7c", size = 8126550, upload-time = "2026-04-01T14:44:26.772Z" }, - { url = "https://files.pythonhosted.org/packages/4e/48/6ffc514adce69f6050d0753b1a18fd920fce8cac87620d5a31231b04bfc5/pillow-12.2.0-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2c727a6d53cb0018aadd8018c2b938376af27914a68a492f59dfcaca650d5eea", size = 6433114, upload-time = "2026-04-01T14:44:29.615Z" }, - { url = "https://files.pythonhosted.org/packages/36/a3/f9a77144231fb8d40ee27107b4463e205fa4677e2ca2548e14da5cf18dce/pillow-12.2.0-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:efd8c21c98c5cc60653bcb311bef2ce0401642b7ce9d09e03a7da87c878289d4", size = 7115667, upload-time = "2026-04-01T14:44:32.773Z" }, - { url = "https://files.pythonhosted.org/packages/c1/fc/ac4ee3041e7d5a565e1c4fd72a113f03b6394cc72ab7089d27608f8aaccb/pillow-12.2.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9f08483a632889536b8139663db60f6724bfcb443c96f1b18855860d7d5c0fd4", size = 6538966, upload-time = "2026-04-01T14:44:35.252Z" }, - { url = "https://files.pythonhosted.org/packages/c0/a8/27fb307055087f3668f6d0a8ccb636e7431d56ed0750e07a60547b1e083e/pillow-12.2.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:dac8d77255a37e81a2efcbd1fc05f1c15ee82200e6c240d7e127e25e365c39ea", size = 7238241, upload-time = "2026-04-01T14:44:37.875Z" }, - { url = "https://files.pythonhosted.org/packages/ad/4b/926ab182c07fccae9fcb120043464e1ff1564775ec8864f21a0ebce6ac25/pillow-12.2.0-cp313-cp313t-win32.whl", hash = "sha256:ee3120ae9dff32f121610bb08e4313be87e03efeadfc6c0d18f89127e24d0c24", size = 6379592, upload-time = "2026-04-01T14:44:40.336Z" }, - { url = "https://files.pythonhosted.org/packages/c2/c4/f9e476451a098181b30050cc4c9a3556b64c02cf6497ea421ac047e89e4b/pillow-12.2.0-cp313-cp313t-win_amd64.whl", hash = "sha256:325ca0528c6788d2a6c3d40e3568639398137346c3d6e66bb61db96b96511c98", size = 7085542, upload-time = "2026-04-01T14:44:43.251Z" }, - { url = "https://files.pythonhosted.org/packages/00/a4/285f12aeacbe2d6dc36c407dfbbe9e96d4a80b0fb710a337f6d2ad978c75/pillow-12.2.0-cp313-cp313t-win_arm64.whl", hash = "sha256:2e5a76d03a6c6dcef67edabda7a52494afa4035021a79c8558e14af25313d453", size = 2465765, upload-time = "2026-04-01T14:44:45.996Z" }, +version = "12.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035, upload-time = "2026-07-01T11:56:38.965Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9d/ac/31fb64e1e7efb5a4b50cd3d92049ba89ac6e4d8d3bb6a74e15048ca3353e/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl", hash = "sha256:21900ce7ba264168cd50defae43cd75d25c833ad4ad6e73ffc5596d12e25ac89", size = 4161684, upload-time = "2026-07-01T11:54:25.934Z" }, + { url = "https://files.pythonhosted.org/packages/87/b4/9805e23d2b4d77842b468513841fda254ee42f0289d25088340e4ff46e2d/pillow-12.3.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4e8c2a84d977f50b9daed6eeaf3baef67d00d5d74d932288f02cb94518ee3ace", size = 4255487, upload-time = "2026-07-01T11:54:27.935Z" }, + { url = "https://files.pythonhosted.org/packages/df/39/ecf519435a200c693fe053a6ee4d835b41cf963a4dfc2551c4e637cb2a71/pillow-12.3.0-cp313-cp313-ios_13_0_x86_64_iphonesimulator.whl", hash = "sha256:ae26d61dfa7a47befdc7572b521024e8745f3d809bd95ca9505a7bba9ef849ec", size = 3696433, upload-time = "2026-07-01T11:54:29.813Z" }, + { url = "https://files.pythonhosted.org/packages/42/92/2fc3ffad878ae8dd5469ec1bc8eb83b71f48e13efdf68f02709003982a32/pillow-12.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:7a743ff716f746fc19a9557f60dab1600d4613255f8a7aeb3cdde4db7eb15a66", size = 5345889, upload-time = "2026-07-01T11:54:31.97Z" }, + { url = "https://files.pythonhosted.org/packages/10/76/8803c13605b763d33d156c4678fc77f8443389c0c51c8aef707bb02015f4/pillow-12.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d69141514cc30b774ceea5e3ed3a6635c8d8a96edf664689b890f4089111fb35", size = 4780109, upload-time = "2026-07-01T11:54:34.026Z" }, + { url = "https://files.pythonhosted.org/packages/1f/01/e18aff37cb0b4aac47ac90f016d347a49aca667ef97f190b06ac2aabc928/pillow-12.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f7401aebd7f581d7f83a439d87d474999317ee099218e5ad25d125290990ba65", size = 6263736, upload-time = "2026-07-01T11:54:36.131Z" }, + { url = "https://files.pythonhosted.org/packages/f7/62/de5bdd77d935331f4f802edc11e4d82950f642caad6cb2f949837b8560e2/pillow-12.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0847a763afefb695bc912d7c131e7e0632d4edc1d8698f58ddabec8e46b8b6d3", size = 6937129, upload-time = "2026-07-01T11:54:38.216Z" }, + { url = "https://files.pythonhosted.org/packages/70/4d/105627a13300c5e0df1d174230b32fd1273062c96f7745fd552b945d1e1d/pillow-12.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:571b9fcb07b97ef3a492028fb3d2dc0993ca23a06138b0315286566d29ef718a", size = 6339562, upload-time = "2026-07-01T11:54:40.354Z" }, + { url = "https://files.pythonhosted.org/packages/6b/1d/f13de01a553988ab895ba1c722e06cf3144d4f57656fd5b81b6d881f1179/pillow-12.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:756c768d0c9c2955feb7a56c37ea24aea2e369f8d36a88da270b6a9f19e62b5e", size = 7049439, upload-time = "2026-07-01T11:54:42.489Z" }, + { url = "https://files.pythonhosted.org/packages/c9/f9/066794cca041b969964f779ee5fa66a9498bbf34248ac39c5d7954e4198f/pillow-12.3.0-cp313-cp313-win32.whl", hash = "sha256:a876864214e136f0eb367788dbd7df045f4806801518e2cfe9e13229cfe06d8f", size = 6473287, upload-time = "2026-07-01T11:54:44.9Z" }, + { url = "https://files.pythonhosted.org/packages/a6/9b/7a58e61d62be561da3a356fe2384d4059a6345fc130e23ef1c36a5b81d24/pillow-12.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:1cca606cd25738df4ed873d5ad46bbdb3d83b5cbca291f6b4ff13a4df6b0bbe8", size = 7239691, upload-time = "2026-07-01T11:54:47.141Z" }, + { url = "https://files.pythonhosted.org/packages/aa/b0/c4ed4f0ef8f8fa5ee8351537db6650bb8189f7e118842978dd6589065692/pillow-12.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:b629de27fda84b42cde7edef0d85f13b958b47f6e9bbcbba9b673c562a89bd8b", size = 2568185, upload-time = "2026-07-01T11:54:49.137Z" }, ] [[package]] @@ -1565,7 +1558,7 @@ wheels = [ [[package]] name = "transformers" -version = "5.2.0" +version = "5.5.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "huggingface-hub" }, @@ -1576,11 +1569,11 @@ dependencies = [ { name = "safetensors" }, { name = "tokenizers" }, { name = "tqdm" }, - { name = "typer-slim" }, + { name = "typer" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/bd/7e/8a0c57d562015e5b16c97c1f0b8e0e92ead2c7c20513225dc12c2043ba9f/transformers-5.2.0.tar.gz", hash = "sha256:0088b8b46ccc9eff1a1dca72b5d618a5ee3b1befc3e418c9512b35dea9f9a650", size = 8618176, upload-time = "2026-02-16T18:54:02.867Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ff/9d/fb46e729b461985f41a5740167688b924a4019141e5c164bea77548d3d9e/transformers-5.5.0.tar.gz", hash = "sha256:c8db656cf51c600cd8c75f06b20ef85c72e8b8ff9abc880c5d3e8bc70e0ddcbd", size = 8237745, upload-time = "2026-04-02T16:13:08.113Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4e/93/79754b0ca486e556c2b95d4f5afc66aaf4b260694f3d6e1b51da2d036691/transformers-5.2.0-py3-none-any.whl", hash = "sha256:9ecaf243dc45bee11a7d93f8caf03746accc0cb069181bbf4ad8566c53e854b4", size = 10403304, upload-time = "2026-02-16T18:53:59.699Z" }, + { url = "https://files.pythonhosted.org/packages/e7/28/35f7411ff80a3640c1f4fc907dcbb6a65061ebb82f66950e38bfc9f7f740/transformers-5.5.0-py3-none-any.whl", hash = "sha256:821a9ff0961abbb29eb1eb686d78df1c85929fdf213a3fe49dc6bd94f9efa944", size = 10245591, upload-time = "2026-04-02T16:13:03.462Z" }, ] [[package]] @@ -1609,18 +1602,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/4a/91/48db081e7a63bb37284f9fbcefda7c44c277b18b0e13fbc36ea2335b71e6/typer-0.24.1-py3-none-any.whl", hash = "sha256:112c1f0ce578bfb4cab9ffdabc68f031416ebcc216536611ba21f04e9aa84c9e", size = 56085, upload-time = "2026-02-21T16:54:41.616Z" }, ] -[[package]] -name = "typer-slim" -version = "0.24.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typer" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/a7/a7/e6aecc4b4eb59598829a3b5076a93aff291b4fdaa2ded25efc4e1f4d219c/typer_slim-0.24.0.tar.gz", hash = "sha256:f0ed36127183f52ae6ced2ecb2521789995992c521a46083bfcdbb652d22ad34", size = 4776, upload-time = "2026-02-16T22:08:51.2Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a7/24/5480c20380dfd18cf33d14784096dca45a24eae6102e91d49a718d3b6855/typer_slim-0.24.0-py3-none-any.whl", hash = "sha256:d5d7ee1ee2834d5020c7c616ed5e0d0f29b9a4b1dd283bdebae198ec09778d0e", size = 3394, upload-time = "2026-02-16T22:08:49.92Z" }, -] - [[package]] name = "typing-extensions" version = "4.15.0" diff --git a/scripts/ci/build/lambda/pre_build.sh b/scripts/ci/build/lambda/pre_build.sh index 89c474514071..218316609287 100755 --- a/scripts/ci/build/lambda/pre_build.sh +++ b/scripts/ci/build/lambda/pre_build.sh @@ -1,12 +1,18 @@ #!/usr/bin/env bash # Pre-build hook for Lambda images. -# Downloads the thread-mode RIC preview tarball from S3 for preview targets. +# Downloads the multi-mode concurrency RIC tarball from S3 for targets that need it. # # Usage: # bash scripts/ci/build/lambda/pre_build.sh --config-file # # Side effects: -# Places awslambdaric tarball in docker/lambda/artifacts/ (preview targets only) +# Places the awslambdaric tarball in docker/lambda/artifacts/ (RIC targets only) +# +# Versioning: awslambdaric_version (e.g. 3.1.1) is the Python package version and +# may repeat across RIC releases, so it alone cannot identify a build. +# awslambdaric_release (e.g. 2.0.0.0) is the RIC release version and is the +# provenance key: it selects the S3 path so each image traces to exactly one build +# and rollback is a one-field change. It is required for RIC targets. set -euo pipefail @@ -24,13 +30,15 @@ done TARGET=$(yq '.build.target' "$CONFIG_FILE") AWSLAMBDARIC_VERSION=$(yq '.build.awslambdaric_version // "3.1.1"' "$CONFIG_FILE") +AWSLAMBDARIC_RELEASE=$(yq '.build.awslambdaric_release // ""' "$CONFIG_FILE") if [[ "$TARGET" == *preview* ]]; then - echo "Preview target detected — downloading RIC tarball..." + [[ -n "$AWSLAMBDARIC_RELEASE" ]] || { echo "ERROR: awslambdaric_release is required for RIC targets" >&2; exit 1; } + echo "RIC target detected — downloading RIC tarball (release ${AWSLAMBDARIC_RELEASE}, version ${AWSLAMBDARIC_VERSION})..." mkdir -p docker/lambda/artifacts - aws s3 cp "s3://dlc-cicd-wheels/lambda-ric/awslambdaric-${AWSLAMBDARIC_VERSION}.tar.gz" \ + aws s3 cp "s3://dlc-cicd-wheels/lambda-ric/${AWSLAMBDARIC_RELEASE}/awslambdaric-${AWSLAMBDARIC_VERSION}.tar.gz" \ "docker/lambda/artifacts/awslambdaric-${AWSLAMBDARIC_VERSION}.tar.gz" --region us-west-2 echo "RIC tarball downloaded." else - echo "Non-preview target — skipping RIC tarball download." + echo "Non-RIC target — skipping RIC tarball download." fi diff --git a/test/lambda/unit/test_lambda_runtime.py b/test/lambda/unit/test_lambda_runtime.py index b67065a23b8b..b6f54093f8cf 100644 --- a/test/lambda/unit/test_lambda_runtime.py +++ b/test/lambda/unit/test_lambda_runtime.py @@ -3,11 +3,27 @@ import importlib import os +import pytest + def test_awslambdaric_importable(): importlib.import_module("awslambdaric") +def test_concurrency_mode_valid_when_set(): + """If the concurrency-mode knob is set, it must be a supported value.""" + mode = os.environ.get("AWS_LAMBDA_CONCURRENCY_MODE") + if mode is not None: + assert mode in {"thread", "process", "hybrid"}, f"unexpected concurrency mode: {mode}" + + +def test_multimode_ric_provides_concurrency_hooks(): + """The multi-mode RIC ships the concurrency-hooks module (source of the + pre-fork hook decorator); the older single-mode client does not.""" + if os.environ.get("AWS_LAMBDA_CONCURRENCY_MODE") is not None: + importlib.import_module("awslambdaric.lambda_concurrency_hooks") + + def test_rie_binary_exists(): rie = "/usr/local/bin/aws-lambda-rie" assert os.path.isfile(rie), f"RIE not found at {rie}" @@ -18,3 +34,57 @@ def test_entrypoint_exists(): script = "/lambda_entrypoint.sh" assert os.path.isfile(script), "lambda_entrypoint.sh not found" assert os.access(script, os.X_OK), "lambda_entrypoint.sh not executable" + + +def _multimode_config_provider(): + """Return the multi-mode RIC's config provider, or skip if the running image + ships the older single-mode client (which has no concurrency-mode support).""" + lambda_config = pytest.importorskip("awslambdaric.lambda_config") + provider = getattr(lambda_config, "LambdaConfigProvider", None) + if provider is None or not hasattr(provider, "concurrency_mode"): + pytest.skip("multi-mode RIC not present in this image") + return provider + + +@pytest.mark.parametrize("mode", ["process", "thread", "hybrid"]) +def test_concurrency_mode_runtime_override(monkeypatch, mode): + """A runtime env-var override — as set by `docker run -e ...` or by a Lambda + function's environment configuration — must win over the image's baked default + and be honored by the RIC's config resolution, for every supported mode.""" + provider = _multimode_config_provider() + # RUNTIME_API is required for the provider to construct; value is unused here. + monkeypatch.setenv("AWS_LAMBDA_RUNTIME_API", "127.0.0.1:9001") + monkeypatch.setenv("AWS_LAMBDA_CONCURRENCY_MODE", mode) + # environ defaults to the live os.environ, so this reads the overridden value. + cfg = provider(["python", "handler.handler"]) + assert cfg.concurrency_mode == mode + + +def test_concurrency_mode_invalid_override_rejected(monkeypatch): + """An unsupported override value must be rejected loudly, not silently ignored.""" + provider = _multimode_config_provider() + monkeypatch.setenv("AWS_LAMBDA_RUNTIME_API", "127.0.0.1:9001") + monkeypatch.setenv("AWS_LAMBDA_CONCURRENCY_MODE", "bogus") + with pytest.raises(ValueError): + provider(["python", "handler.handler"]) + + +def test_ric_resolves_container_env(): + """End-to-end: assert the RIC resolves the concurrency mode actually injected + into the container. The expected value comes from a SEPARATE var + (EXPECTED_CONCURRENCY_MODE), not the var under test, so a failure of + AWS_LAMBDA_CONCURRENCY_MODE to propagate cannot silently pass. CI runs this + with the image's baked default (no override) and again under an `-e` override + for every supported mode.""" + provider = _multimode_config_provider() + # RUNTIME_API is required for the provider to construct; value is unused here. + env = {**os.environ, "AWS_LAMBDA_RUNTIME_API": "127.0.0.1:9001"} + resolved = provider(["python", "handler.handler"], environ=env).concurrency_mode + expected = os.environ.get("EXPECTED_CONCURRENCY_MODE") + if expected is None: + # No injected expectation → the image's baked default must resolve. + assert resolved == "process" + else: + # Prove the override propagated into the container AND the RIC honored it. + assert os.environ.get("AWS_LAMBDA_CONCURRENCY_MODE") == expected + assert resolved == expected diff --git a/test/security/data/ecr_scan_allowlist/lambda/framework_allowlist.json b/test/security/data/ecr_scan_allowlist/lambda/framework_allowlist.json index f3cd70c81860..6377c2db8200 100644 --- a/test/security/data/ecr_scan_allowlist/lambda/framework_allowlist.json +++ b/test/security/data/ecr_scan_allowlist/lambda/framework_allowlist.json @@ -10,66 +10,76 @@ { "vulnerability_id": "CVE-2025-23308", "reason": "NVIDIA CUDA toolkit CVE in cuda-toolkit-config-common. Fix requires CUDA 13.x base image which is not yet available. Not exploitable at Lambda runtime (requires user to run nvdisasm on malicious ELF).", - "review_by": "2026-07-15" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2025-23339", "reason": "NVIDIA CUDA toolkit CVE in cuda-toolkit-config-common. Fix requires CUDA 13.x base image which is not yet available. Not exploitable at Lambda runtime (requires user to run cuobjdump on malicious ELF).", - "review_by": "2026-07-15" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-25679", "reason": "Go stdlib CVE in aws-lambda-rie binary. Fixed in Go 1.26.x but no new RIE release yet. We download releases/latest so this will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-27142", "reason": "Go stdlib CVE in aws-lambda-rie binary. Fixed in Go 1.26.x but no new RIE release yet. We download releases/latest so this will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-32280", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.2. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-32281", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.2. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-32283", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.2. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-33811", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.3. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-33814", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.3. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-39820", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.3. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-39836", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.3. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-42499", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.3. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" }, { "vulnerability_id": "CVE-2026-42504", "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.4. No new RIE release yet. Will auto-resolve on next RIE release.", - "review_by": "2026-07-01" + "review_by": "2026-10-01" + }, + { + "vulnerability_id": "CVE-2026-27145", + "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.4. No new RIE release yet. We download releases/latest so this will auto-resolve on next RIE release.", + "review_by": "2026-10-01" + }, + { + "vulnerability_id": "CVE-2026-39822", + "reason": "Go stdlib CVE in aws-lambda-rie binary (built with Go 1.25.8). Fixed in Go 1.26.5. No new RIE release yet. We download releases/latest so this will auto-resolve on next RIE release.", + "review_by": "2026-10-01" } ]