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

serverless docker images (python 3.9) #647

Closed
gmetzker opened this issue Nov 23, 2021 · 11 comments · Fixed by #724
Closed

serverless docker images (python 3.9) #647

gmetzker opened this issue Nov 23, 2021 · 11 comments · Fixed by #724

Comments

@gmetzker
Copy link

I'm wondering if you have considered publishing your own set of python docker images for use in your plugin? Lambci lacks support for python 3.9, despite a PR and several requests. Others are wondering what the status of the project is. It seems they have not updated their other docker images in 10 months or so.

It would be super helpful to have a verified set of images on docker hub from a trusted source.

@ronkorving
Copy link

If it helps, I switched to mlupin/docker-lambda:python3.9-build

@sscarduzio
Copy link

how do you "switch" to another image? All I am doing is sls deploy, and it looks for lamci's non-existing 3.9 build image. Where do I specify the docker image for building?

@ronkorving
Copy link

ronkorving commented Jan 4, 2022

@sscarduzio :

custom:
  pythonRequirements:
    dockerImage: mlupin/docker-lambda:python3.9-build

See readme.

@mhihasan
Copy link

But, we need some kind of "official" support for those docker images of new python versions.

@takeda
Copy link

takeda commented Feb 15, 2022

@mhihasan despite repo's name it's not some kind of official Amazon AWS repo. Just somebody who created docker images that replicate AWS lambda environment. mlupin/docker-lambda is as official as this one is.

This repo was not touched over a year even though owner appears to contribute to other of his repos. I think we are told to move on and he is not interested in maintaining it.

@bryantbiggs
Copy link
Contributor

can we just switch to SAM CLI build images? They will always have support https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-image-repositories.html

@jcranendonk
Copy link

I've been successful using dockerImage: public.ecr.aws/sam/emulation-python3.9:latest.

@zhemaituk
Copy link
Contributor

Good stuff, but there are some downsides though, comparing to mlupin images. E.g. when pip install psutil on AWS image:
error: command 'gcc' failed: No such file or directory

@tooruuetani
Copy link

How about public.ecr.aws/sam/build-python3.9 ?
It works for me.

@zhemaituk
Copy link
Contributor

@tooruuetani thank you, works like a charm.

My config for aarch64 build:

provider:
  name: aws
  runtime: python3.9
  architecture: arm64
custom:
  pythonRequirements:
    slim: true
    dockerizePip: true
    dockerRunCmdExtraArgs: [ '--platform', 'linux/arm64/v8' ]
    dockerImage: public.ecr.aws/sam/build-python3.9:latest-arm64

@pgrzesik
Copy link
Contributor

pgrzesik commented Sep 27, 2022

Hey everyone, I believe the best way would to be switch to official AWS images as defaults for building. PR #724 proposed that change, but please note that it will require a major version bump as it will be considered a breaking change. I've tested different scenarios for packaging, but any feedback is more than welcome

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

Successfully merging a pull request may close this issue.

10 participants