OSError: .......cannot open shared object file: No such file or directory #209

Open
opened 2024-04-17 13:51:07 -04:00 by Saurabh11811 · 3 comments
Saurabh11811 commented 2024-04-17 13:51:07 -04:00 (Migrated from github.com)

I am using the base code as given in HF

from ctransformers import AutoModelForCausalLM
llm = AutoModelForCausalLM.from_pretrained('marella/gpt-2-ggml')
print(llm('AI is going to'))

While this works fine locally on Mac machine, it fails on any of the linux environment (I tried Debian, Ubuntu, Alpine etc. ) using docker.

Here are the errors for each of them


For Apline (FROM python:3.12.1-alpine3.19)

Error is - OSError: Error relocating /usr/local/lib/python3.12/site-packages/ctransformers/lib/basic/libctransformers.so: unsupported relocation type 7


For both Debian, Ubuntu
Error is - OSError: /usr/local/lib/python3.11/site-packages/ctransformers/lib/basic/libctransformers.so: cannot open shared object file: No such file or directory


Even for direct python3.11 images same error comes.

I am trying the latest version

I am using the base code as given in HF from ctransformers import AutoModelForCausalLM llm = AutoModelForCausalLM.from_pretrained('marella/gpt-2-ggml') print(llm('AI is going to')) While this works fine locally on Mac machine, it fails on any of the linux environment (I tried Debian, Ubuntu, Alpine etc. ) using docker. Here are the errors for each of them ****************************************** For Apline (FROM python:3.12.1-alpine3.19) Error is - OSError: Error relocating /usr/local/lib/python3.12/site-packages/ctransformers/lib/basic/libctransformers.so: unsupported relocation type 7 ****************************************** For both Debian, Ubuntu Error is - OSError: /usr/local/lib/python3.11/site-packages/ctransformers/lib/basic/libctransformers.so: cannot open shared object file: No such file or directory ******************************************** Even for direct python3.11 images same error comes. I am trying the latest version
jash-gmu commented 2024-04-23 10:42:30 -04:00 (Migrated from github.com)

i am facing the same issue, did you find any solution ?

i am facing the same issue, did you find any solution ?
Saurabh11811 commented 2024-04-24 08:47:02 -04:00 (Migrated from github.com)

Yes. The issue is because of CPU architecture type for the pulled image. I was using mac and docker by default pull linux image of arm type which is incompatible with ctransformers unless you compile from source (no clear steps). Workaround is you pull the x86/amd image in docker by defining platform parameter in docker file and it will work. BrSaurabhSent from my iPhoneOn 23 Apr 2024, at 8:12 PM, Jashwanth Raj Gowlikar @.***> wrote:
i am facing the same issue, did you find any solution ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Yes. The issue is because of CPU architecture type for the pulled image. I was using mac and docker by default pull linux image of arm type which is incompatible with ctransformers unless you compile from source (no clear steps). Workaround is you pull the x86/amd image in docker by defining platform parameter in docker file and it will work. BrSaurabhSent from my iPhoneOn 23 Apr 2024, at 8:12 PM, Jashwanth Raj Gowlikar ***@***.***> wrote: i am facing the same issue, did you find any solution ? —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
Ajayvenki commented 2024-07-26 10:26:18 -04:00 (Migrated from github.com)
Try. https://github.com/marella/ctransformers/issues/9
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marella/ctransformers#209
No description provided.