https://promptfoo.dev/ logo
Playwright provider not found in self-hosted conta...
# ❓|questions
d
Attempting to use the browser provider in the self-hosted official docker image results in the Chromium browser not being found. From what I can see in the Dockerfile, Playwright is being installed as a peer dependency but is it maybe installed and not copied over during a subsequent build step? https://cdn.discordapp.com/attachments/1308185449361313955/1308185449713631383/Screenshot_2024-11-18_at_4.40.12_PM.png?ex=673d0624&is=673bb4a4&hm=69239502939d31e81429819a154aa330ae7400a5d521947bfb9fb1c55bd8865b&
I think I see the installation is at
/root/.cache/ms-playwright
instead of
/home/promptfoo/.cache/ms-playwright
m
d
Hi @michaelmichaelmichael thanks for the quick follow-up. I tested the branch and am still getting a launch error even though it does seem to now be installed in the proper location with user permissions. https://cdn.discordapp.com/attachments/1308185449361313955/1308449076857274398/image.png?ex=673dfba9&is=673caa29&hm=29f2ea274afaaf3ba396ed61a97fdbc37afd03d4738608a530ca3d1420234e2a&
I even tried using the 0.94 release that still used the root Docker user and got the same error.
Ahh I've been testing this locally on an Apple ARM laptop, I have a sneaking feeling there might be some platform issues at play now.
m
@duncan_46032 I will look into this more for you. We could even set up a multi-arch build. Out of curiosity, what are you evaling?
d
Much appreciated! I have a setup of Microsoft's GraphRAG Accelerator, so the browser provider is using the Streamlit query interface that is already deployed with different indexes already setup. https://github.com/Azure-Samples/graphrag-accelerator
Inspecting the chrome executable leads me to believe it's an arch issue or at least an Alpine dependency thing (I saw there is already some compat installs happening). https://cdn.discordapp.com/attachments/1308185449361313955/1309556503564517487/image.png?ex=67420308&is=6740b188&hm=79e7428feb6749ac8c1f2dc4f78ae43cfb6e6cab9629a22507be540d7897d43b&
m
It looks like there's an API: https://github.com/Azure-Samples/graphrag-accelerator/blob/main/notebooks/2-Advanced_Getting_Started.ipynb I bet you could get it set up as an HTTP provider with a lot less hassle
Do you have time for a quick call?
d
Yea I considered the HTTP provider but it does require exposing an API key unless I mount a file for promptfoo to read the provider info from or writing an entirely new custom provider.
I think building an AMD64 or x86_64 image got me past the initial failing launch errors and using Docker virtualization but then it just hangs on the launch now. I haven't been able to get any additional logging out of it since then. Playwright is not officially supported on Alpine so there might be more dependency issues there.
Unfortunately the work is commercially private so I can't share much of the project info sorry