Is there a way to run a script when building a Gradio space?
I have a Gradio space that needs the Playwright Python library. I have the library installed using the requirements file. However, I couldn’t figure out how to “playwright install” as required. The app through the follow error message without the additional step.playwright._impl._api_types.Error: Executable doesn’t exist at /home/user/.cache/ms-playwright/chromium-1080/chrome-linux/chrome╔════════════════════════════════════════════════════════════╗║ Looks like Playwright was just installed or updated.       ║║ Please run the following command to download new browsers: ║║                                                            ║║     playwright install                                     ║║                                                            ║║ <3 Playwright Team                                         ║╚════════════════════════════════════════════════════════════╝Thanks,
2024-03-14T18:32:18Z
hi@shulik7,You can use this Gradio Docker SDK and run commands during build timehuggingface.coDockerfile · SpacesExamples/Gradio-Docker-Template at mainWe’re on a journey to advance and democratize artificial intelligence through open source and open science.Another optionimport subprocess

subprocess.run(["playwright", "install"])
2024-07-11T02:55:46Z
@radamesThanks for the reply, and sorry for the very late response.I no longer use the Huggingface space because my private space was accessed without authorization. I couldn’t determine the reason, but weeks later, I received an email from Huggingface stating that their team had detected unauthorized access to our Spaces platform, specifically related to Spaces secrets. As a result, they suspect that a subset of Spaces’ secrets might have been accessed without authorization.