Skip to content

Commit

Permalink
install playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Jan 14, 2025
1 parent e65f9df commit 388b037
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions eve/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,27 @@ async def trigger_delete(
image = (
modal.Image.debian_slim(python_version="3.11")
.env({"DB": db, "MODAL_SERVE": os.getenv("MODAL_SERVE")})
.apt_install("git", "libmagic1", "ffmpeg", "wget")
.apt_install(
"git",
"libmagic1",
"ffmpeg",
"wget",
# Add Playwright dependencies
"libnss3",
"libnspr4",
"libatk1.0-0",
"libatk-bridge2.0-0",
"libcups2",
"libatspi2.0-0",
"libxcomposite1",
)
.pip_install_from_pyproject(str(root_dir / "pyproject.toml"))
.pip_install("numpy<2.0", "torch==2.0.1", "torchvision", "transformers", "Pillow")
.run_commands(["playwright install"])
.run_function(download_nsfw_models)
.copy_local_dir(str(workflows_dir), "/workflows")
)


@app.function(
image=image,
keep_warm=1,
Expand Down

0 comments on commit 388b037

Please sign in to comment.