I wrote a python function for solving a Mixed Integer Linear Program, which uses the Pyomo Library and SCIP as external solver. My goal is to deploy the function as an AWS Lambda Function. Since I also need to install SCIP, I decided to deploy the Lambda as a Docker Container. I do not use an AWS Base Image but rather a custom image (python 3.10-bullseye). My Dockerfile looks very similar to what you find in the AWS Documentation (text), except that I also have a line to install the SCIP package:
RUN apt-get update && apt-get install -y ${FUNCTION_DIR}/SCIPOptSuite-8.0.3-Linux-debian.deb
Now, when I try to test the Lambda function locally, like it is explained in the documentation (using curl -XPOST ...), everything works perfectly fine. However, when I then push my image to the ECR and deploy a Lambda function based on it, it doesn't work anymore.
The concrete Error Message I get is:
START RequestId: 8fe2a5ca-4aa2-4e38-9be1-c2d4b1719147 Version: $LATEST
[ERROR] 2023-07-05T13:32:44.116Z 8fe2a5ca-4aa2-4e38-9be1-c2d4b1719147 Solver (scip) returned non-zero return code (-11)
[ERROR] 2023-07-05T13:32:44.116Z 8fe2a5ca-4aa2-4e38-9be1-c2d4b1719147 See the solver log above for diagnostic information.
[ERROR] ApplicationError: Solver (scip) did not exit normally
and it happens in the line where Pyomo calls the external solver:
solver.solve(model, tee=True).
According to SCIP, error code -11 stands for SCIP_PLUGINNOTFOUND, so it seems like something is missing inside the container, or at least is not where it is expected to be found.
While the error message tells me to see the solver log above, there are no logs that I can see from the solver. I have tried to find out at least which plugin is missing but I failed. I believe that ultimately, it won't come down to which plugin is missing, but rather is an AWS Lambda issue not releated to SCIP directly, so it would be interesting to know what could have gone wrong here, or how I could debug the problem and find out more about it.