How to find the path of the package installed in the function using the build command
- 0
- Functions

I built the function using python 3.11 runtime. I'm using the pdf2image python-pip package. However this package depends on poppler-utils at os-level.
To achieve this, I'm using the following build command:
apk update && apk add --upgrade poppler-utils && pip install -r requirements.txt
But the issue still persists. pdf2oimage
still not able to find the poppler path

Build logs:
Preparing for build ...
Building ...
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/23) Upgrading musl (1.2.3-r2 -> 1.2.3-r3)
(2/23) Installing libxau (1.0.9-r0)
(3/23) Installing libxdmcp (1.1.3-r0)
(4/23) Installing libxcb (1.15-r0)
(5/23) Installing libx11 (1.8-r1)
(6/23) Installing libxext (1.3.4-r0)
(7/23) Installing libxrender (0.9.10-r3)
(8/23) Installing brotli-libs (1.0.9-r6)
(9/23) Installing libpng (1.6.37-r1)
(10/23) Installing freetype (2.12.1-r0)
(11/23) Installing fontconfig (2.14.0-r0)
(12/23) Installing pixman (0.40.0-r4)
(13/23) Installing cairo (1.17.4-r2)
(14/23) Installing lcms2 (2.13.1-r0)
(15/23) Installing libjpeg-turbo (2.1.3-r1)
(16/23) Installing openjpeg (2.5.0-r0)
(17/23) Installing libgcc (11.2.1_git20220219-r2)
(18/23) Installing libstdc++ (11.2.1_git20220219-r2)
(19/23) Installing libwebp (1.2.3-r2)
(20/23) Installing zstd-libs (1.5.2-r1)
(21/23) Installing tiff (4.4.0-r4)
(22/23) Installing poppler (22.05.0-r0)
(23/23) Installing poppler-utils (22.05.0-r0)
Executing busybox-1.35.0-r17.trigger
OK: 31 MiB in 58 packages

hmmm so the problem is the place where the build happens, isn't the same place as where your code runs.
any chance you can donwload some sort of binary and include that in your code instead of installing via apk?

I need to check the possibility

I tried with binary approach, but now I'm stuck with following error:
OSError: [Errno 8] Exec format error

Did you use a binary for alpine? X86 or arm?

python3.11-apline

I'm not sure about x86 or ARM. I'm generating the binary and libs through the docker container running on Apple M1 chip. I will check which arch is the output

apple M1 would be an arm-based CPU

so wherever you deploy would need to also be arm-based

Noted! I will retry tomorrow. Thank you Steven
Recommended threads
- Function running in cloud but not locall...
Hi everyone, I have an appwrite function which is on python3.12 runtime. I have a library (hnswlib) which builds wheels during installation. This works on appwr...
- Permissions for bulk operation
Hi team, I have a question: βIn the databases.createDocuments bulk API, can I set document-level permissions? If yes, how exactly should I include the permissio...
- Limit File Upload count?
Is there a way to limit the number of files a user can upload? I know there's a limit of file size but in my case I'd like to limit the user to only upload x am...
