Open thabied opened 3 years ago
Hi @thabied , sorry I'm really not familiar with AWS but to install surprise you can either install a binary from conda, OR you'll have to build from source (e.g. when installing with pip install
). That will require a compiler, Cython, etc (see our building from source instructions)
Hi @thabied , sorry I'm really not familiar with AWS but to install surprise you can either install a binary from conda, OR you'll have to build from source (e.g. when installing with pip install
). That will require a compiler, Cython, etc (see our building from source instructions)
Hi @thabied, I had the same issue and installing gcc on my Docker image that I use with AWS sam worked fine for me. I added this line to my Dockerfile before installing Surprise:
RUN yum install gcc -y
I am deploying my Lambda function as a container image. See here for an example.
Description
I am trying to deploy a customer recommendation API on AWS Lambda using the sam CLI and docker following this tutorial: https://sejalv.medium.com/containerized-ml-deployment-with-aws-lambda-680540fb92f4
I am using a base python image from aws's public ecr and I've added scikit-surprise and numpy in my requirements.txt file as stated in your installation doc but when I run
$ sam build
I get the following error message:Steps/Code to Reproduce
You need an aws account and aws-cli installed
Find a directory you want to work from and make sure docker is running and you're logged in:
pip install aws-sam-cli
sam init
select options 1 (template) then 2 (base image) then 5 (python3.7) - this will create a project template folder in this directory
add scikit-surprise and numpy to requirements.txt file and then run
sam build
Expected Results
I tried adding wheel to the requirements.txt file but it's still not working.
Please let me know if there's any other information you need from me
Actual Results
Versions
Darwin-20.3.0-x86_64-i386-64bit public.ecr.aws/lambda/python:3.7 as base - python 3.7 ecr base image surprise 1.1.1