You should use yum package manager.
Here are the commands for installing tesseract on OpenSuse:
https://tesseract-ocr.github.io/tessdoc/InstallationOpenSuse.html
add --nogpgcheck flag to skip key check.
Here is how your dockerfile should look like:
FROM public.ecr.aws/lambda/python:3.7
RUN yum install -y yum-utils
RUN yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/Alexander_Pozdnyakov/RHEL_7/
RUN yum update
RUN yum install -y tesseract --nogpgcheck
RUN yum install -y tesseract-langpack-heb --nogpgcheck
WORKDIR /code
COPY . .
COPY policy.xml /etc/ImageMagick-6
RUN yum install -y ghostscript
RUN pip install -r requirements.txt
EXPOSE 80
CMD ["app.lambda_handler"]
Answer from dina on Stack OverflowHi,
I'm trying to setup a Python lambda function that requires Pytorch. Apparently one of the code's dependencies is using libgl1-mesa-glx
In the Dockerfile I tried to add
RUN apt-get update && apt-get install libgl1-mesa-glx
But when building the Docker image it tells me it's missing the apt-get command. I tried also with aptitude and apt, but still nothing.
I'm building the Docker image public.ecr.aws/lambda/python:3.8 https://github.com/aws/aws-lambda-base-images/blob/python3.8/Dockerfile.python3.8 which is built FROM scratch as I can tell.
What can I do to solve this? Why is apt-get command missing and is there an alternative way to install the libgl1-mesa-glx stuff?
thanks
amazon web services - How can I access the shell of the AWS Lambda images on ECR - Stack Overflow
Working with AWS Lambda Python from Docker images - why is apt-get command missing?
docker - Install poppler in AWS base python image for Lambda - Stack Overflow
Lambda Python Dockerfile Yum
Hi,
I'm trying to setup a Python lambda function that requires Pytorch. Apparently one of the code's dependencies is using libgl1-mesa-glx
In the Dockerfile I tried to add
RUN apt-get update && apt-get install libgl1-mesa-glx
But when building the Docker image it tells me it's missing the apt-get command. I tried also with aptitude and apt, but still nothing.
I'm building the Docker image public.ecr.aws/lambda/python:3.8 which is built FROM scratch as I can tell.
What can I do to solve this? Why is apt-get command missing and is there an alternative way to install the libgl1-mesa-glx stuff?
thanks
Hi, I've been creating some code and uploading it using a Dockerfile image into AWS ECR. Then I load the image onto AWS Lambda where I run the code.
My docker file starts like this:
Start with the base image
FROM public.ecr.aws/lambda/python:3.11 as build
Install system-level dependencies for Chrome and FFmpeg
RUN yum install -y unzip atk cups-libs gtk3 libXcomposite alsa-lib \
I've been using this docker file with docker build and uploading it for weeks now without any issue. Today when I did docker build I got this error:
=> ERROR [ 2/16] RUN yum install -y unzip atk cups-libs gtk3 libXcomposite alsa-lib ERROR: failed to solve: process "/bin/sh -c yum install -y unzip atk cups-libs gtk3 libXcomposite alsa-lib
Which I thought could be the base image, that did not have yum installed. But it is the same 3.11 as previous days.
Any idea or solutions to this? Do you guys know if the base image python:3.11 has changed in any way recently?