-
Notifications
You must be signed in to change notification settings - Fork 293
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
is it possible to specify order of installation of packages in the requirements.txt? #294
Comments
There is no way that I know of currently but I think we could adopt a feature similar to nodeploy to hint to keep them in a specific order. Eg: numpy #no-sort Thoughts? Could also be named #first or something. |
fastparquet specifies numpy as a dependency. Have you tried leaving numpy out of your |
I tried these steps:
And that failed. But (blowing away pip's cache and) replacing the last step with That's supposed to be fixed on their end, maybe it's a regression? Otherwise the solution for the plugin is to run a sequence of pip commands, which is starting to get pretty klugey. Another solution is #225, was to be able to run arbitrary commands pre and post commands docker. That's still klugey, but it would be far more flexible for one-off cases like this. |
I solve the installation problem by adding
But the lambda function still has this error when I run it
I wonder if fastparquet can't work in lambda. |
That sounds like it's trying to do IPC, and Lambda greatly limits what IPC you can do. The multiprocessing module, for instance, relies on semaphores and shared memory and generally won't work. This will fail with the same error:
|
Thanks, close the issue now! |
If you're looking for next steps, probably ECS and Fargate would be the route to go, possibly via containerless. (Which I need to try some time, myself...) |
Ooh. Neat plugin @bsamuel-ui. BTW, keep your eyes peeled for sls v2 pre-release early next year. one of the things it'll feature is near-frictionless ability to move a function from running on lamba to running on fargate 🙂 |
I am experiencing the same issue with numpy. Whatever order I use in the requirements.txt, the order gets changed when the requirements.txt is generated within the .serverless folder. Could you detail how you fixed it? You added that part in the DockImage? (might be a naive question but I just started experimenting with serverless framework) |
you can create your Dockerfile copy the source Dockerfile from https://github.com/lambci/docker-lambda/blob/master/python3.6/build/Dockerfile
or if you just want to reorder the package in the requirements.txt, you can find this line |
my requirements.txt includes
fastparquet
andnumpy
, and no matter what order I put them in the file, it seems like the plugin always look forfastparquet
beforenumpy
. However, to run setup.py offastparquet
, it requiresnumpy
to be installed first.I wonder is there any way to change the order of the installation, and if it does, will it solve the problem?
The text was updated successfully, but these errors were encountered: