Open
Description
I am writing the below docker code:
FROM public.ecr.aws/lambda/python:3.9
# Install OpenJDK Java 8
RUN yum -y install java-1.8.0-openjdk
# Setting java home
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.382.b05-1.amzn2.0.2.x86_64
ENV PATH "$PATH:$JAVA_HOME/bin"
# copy all the directories in the root folder for lambda function
COPY . ${LAMBDA_TASK_ROOT}
# install python dependencies
COPY requirements.txt .
RUN pip3 install --upgrade pip && pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"
# see https://docs.aws.amazon.com/lambda/latest/dg/troubleshooting-deployment.html#troubleshooting-deployment-denied
RUN chmod 644 $(find . -type f) && chmod 755 $(find . -type d)
# Invoke Lambda
CMD [ "lambda_function.lambda_handler" ]
I am also defining the JAVA_HOME path also in lambda function, but i still am facing error when i use pypmml. Below is the error which i get:
[DEBUG] 2023-11-02T16:11:50.262Z 1f5d2fe4-ed9f-402e-acb6-4993c9982cbe Launching gateway with command ['/usr/lib/java-1.8.0-openjdk-1.8.0.382.b05-1.amzn2.0.2.x86_64/bin/java', '-classpath', '/var/task/py4j/../share/py4j/py4j0.10.9.7.jar:/var/task/pypmml/jars/*', 'py4j.GatewayServer', '--die-on-broken-pipe', '0']
[ERROR] 2023-11-02T16:11:50.266Z 1f5d2fe4-ed9f-402e-acb6-4993c9982cbe [Errno 2] No such file or directory: '/usr/lib/java-1.8.0-openjdk-1.8.0.382.b05-1.amzn2.0.2.x86_64/bin/java'
Metadata
Metadata
Assignees
Labels
No labels
Activity