Haystack in Docker container on Linux - problem with tiktoken #4969
-
I am really struggling to get Haystack to run in a Docker container - the application leverages 'gpt-3.5-turbo' and 'gpt-4' models from OpenAI for generation and 'text-embedding-ada-002' for embeddings. The crux of the problem is Haystack seems to assume tiktoken not available when it is. The result it Haystack falls back to GPT2TokenizerFast. This breaks my application since I am using large prompts. Here is my dockerfile:
The docker container builds but when I run the app I get this warning:
If I spin up python on the container I can see tiktoken is installed just fine:
The platform is:
I wonder if this line of code is required? Any pointers here - I need to leverage OpenAI fully and this is stopping me distribute my application. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
OK - my workaround was to use amd64 base image. Updated dockerfile to:
|
Beta Was this translation helpful? Give feedback.
OK - my workaround was to use amd64 base image. Updated dockerfile to: