From 4c3baffca0890575517a8b1473e9fe086bf41f5b Mon Sep 17 00:00:00 2001 From: "promptless[bot]" <179508745+promptless[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:27:09 +0000 Subject: [PATCH] Add dependencies example to load-balanced endpoint pattern --- flash/create-endpoints.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/flash/create-endpoints.mdx b/flash/create-endpoints.mdx index 04b2b10b..b935c461 100644 --- a/flash/create-endpoints.mdx +++ b/flash/create-endpoints.mdx @@ -65,12 +65,13 @@ from runpod_flash import Endpoint, GpuType api = Endpoint( name="inference-api", gpu=GpuType.NVIDIA_GEFORCE_RTX_4090, - workers=(1, 5) + workers=(1, 5), + dependencies=["torch"] ) @api.post("/predict") async def predict(data: dict) -> dict: - import torch + import torch # Import inside the function body # Run inference return {"prediction": "result"}