Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to deploy into AWS Lambda function #25

Open
weedge opened this issue Aug 14, 2024 · 2 comments
Open

how to deploy into AWS Lambda function #25

weedge opened this issue Aug 14, 2024 · 2 comments

Comments

@weedge
Copy link

weedge commented Aug 14, 2024

from: https://www.daily.co/blog/introducing-daily-python-an-sdk-for-ai-powered-interactive-video-and-audio/
Python is a ubiquitous language and is a de facto standard for Al and machine learning development. daily-python code runs equally well on a Microsoft Azure VM, a Cerebrium application, an AWS Lambda function, your desktop machine, popular loT platforms, and even in a colab notebook.

use sam build --debug info:

2024-08-14 14:57:28,279 | PythonPipBuilder:ResolveDependencies failed
Traceback (most recent call last):
  File "/usr/local/Cellar/aws-sam-cli/1.97.0/libexec/lib/python3.8/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 51, in execute
    package_builder.build_dependencies(
  File "/usr/local/Cellar/aws-sam-cli/1.97.0/libexec/lib/python3.8/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 158, in build_dependencies
    self._dependency_builder.build_site_packages(requirements_path, artifacts_dir_path, scratch_dir_path)
  File "/usr/local/Cellar/aws-sam-cli/1.97.0/libexec/lib/python3.8/site-packages/aws_lambda_builders/workflows/python_pip/packager.py", line 261, in build_site_packages
    raise MissingDependencyError(packages_without_wheels)
aws_lambda_builders.workflows.python_pip.packager.MissingDependencyError: {daily-python==0.10.1(wheel)}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/Cellar/aws-sam-cli/1.97.0/libexec/lib/python3.8/site-packages/aws_lambda_builders/workflow.py", line 371, in run
    action.execute()
  File "/usr/local/Cellar/aws-sam-cli/1.97.0/libexec/lib/python3.8/site-packages/aws_lambda_builders/workflows/python_pip/actions.py", line 57, in execute
    raise ActionFailedError(str(ex))
aws_lambda_builders.actions.ActionFailedError: {daily-python==0.10.1(wheel)}

@weedge
Copy link
Author

weedge commented Aug 19, 2024

use public.ecr.aws/sam/build-python3.11:latest-x86_64 docker to CI

sh-4.2# uname -a
Linux 85e124769e9e 6.6.16-linuxkit #1 SMP PREEMPT_DYNAMIC Fri Feb 16 11:55:08 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

but pip install daily-python no version to match

sh-4.2# pip install daily-python
ERROR: Could not find a version that satisfies the requirement daily-python (from versions: none)
ERROR: No matching distribution found for daily-python

use linux x86 whl don't match

sh-4.2# pip install /tmp/daily_python-0.10.1-cp37-abi3-manylinux_2_28_x86_64.whl 
ERROR: daily_python-0.10.1-cp37-abi3-manylinux_2_28_x86_64.whl is not a supported wheel on this platform.

@aconchillo
Copy link
Contributor

The reason is because this is based on RedHat 7.3 which ships with glibc 2.26. daily-python needs glib >= 2.28.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants