简体   繁体   English

Mac M1(Apple Silicon)上的 AWS SAM Python 调试

[英]AWS SAM Python debug on Mac M1 (Apple Silicon)

I'm currently working with AWS Lambdas functions with Python code.我目前正在使用带有 Python 代码的 AWS Lambdas 函数。 There is an interesting feature while working with them that allows users to debug Lambda functions locally.使用它们时有一个有趣的功能,允许用户在本地调试 Lambda 函数。

When debugging locally the function is ran within a docker image.在本地调试时,该函数在 docker 映像中运行。 While trying to build images in M1 Mac I always have problems.在尝试在 M1 Mac 中构建图像时,我总是遇到问题。

I'm currently trying to debug the Python Lambda function and got this error:我目前正在尝试调试 Python Lambda 函数并收到此错误:

Validate Docker has failed: Cannot run program "docker": error=2, No such file or directory7 has failed: Cannot run program "docker": error=2, No such file or directory

Probably it is related to ARM64 architecture and Docker.可能与ARM64架构和Docker有关。

Anyone knows any workaround in order to debug Python Lambdas locally in Mac M1?任何人都知道在 Mac M1 中本地调试 Python Lambda 的任何解决方法吗?

Solved :已解决

The error was because I had installed Docker for Mac Intel version.错误是因为我安装了 Docker for Mac Intel 版本。

Install Docker with steps recommended by the documentation in this link.使用链接中的文档推荐的步骤安装 Docker。 Be sure that you are installing the Apple Silicon version.确保您安装的是 Apple Silicon 版本。

Also before installing it, it is recommended to install Rosseta 2 in your Mac M1 Apple Silicon.同样在安装之前,建议在您的 Mac M1 Apple Silicon 中安装 Rosseta 2。

$ softwareupdate --install-rosetta

Also in this page there are some common issues and troubleshoots for Docker in Mac M1 Apple Silicon.此外,在页面中,还有一些针对 Mac M1 Apple Silicon 中的 Docker 的常见问题和故障排除。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Apple Silicon M1 上的 Python Tensorflow 和 OpenCV - Python Tensorflow and OpenCV on Apple Silicon M1 在具有 M1 芯片(基于 ARM 的 Apple Silicon)的 Mac 上安装早期版本的 Python(3.8 之前)失败 - Installation of earlier versions of Python (prior to 3.8) fails on Mac with M1 Chip (ARM based Apple Silicon) python Apple 错误 TensorFlow on M1 (apple silicon) - python errors in Apple TensorFlow on M1 (apple silicon) python 密码学未在 Apple Silicon M1 PRO 上安装 pkcs7 - python cryptography not installing pkcs7 on Apple Silicon M1 PRO 使用 docker 在苹果硅 M1 上构建错误 - Build Error on apple silicon M1 with docker CommandNotFoundError:您的 shell 尚未正确配置为使用“conda activate”。 Mac M1 Apple Silicon Miniforge - CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. Mac M1 Apple Silicon Miniforge 如何在 Apple M1 硅的 Mac 上使用 Tensorflow 检查 GPU 可访问性? - How can I check the GPU accessibility with Tensorflow on Mac of Apple M1 silicon? 在 Apple 芯片(M1 Max)上使用 Python 时,有没有办法防止 ray.init() 挂起? - Is there a way to prevent ray.init() from hanging when using Python on Apple silicon (the M1 Max)? 如何在 Apple Silicon (ARM / M1) 上安装 SciPy - How to install SciPy on Apple Silicon (ARM / M1) 导入 pyaudio 不起作用 - 找不到符号:Mac 上的 _PaMacCore_SetupChannelMap(Big Sur M1 Apple Silicon) - Import pyaudio doesn't work - Symbol not found: _PaMacCore_SetupChannelMap on mac (Big Sur M1 Apple Silicon)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM