File tree Expand file tree Collapse file tree
src/runloop_api_client/sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,6 +216,23 @@ class AsyncBlueprintOps:
216216 ... dockerfile="FROM ubuntu:22.04\\ nRUN apt-get update",
217217 ... )
218218 >>> blueprints = await runloop.blueprint.list()
219+
220+ To use a local directory as a build context, use an object.
221+
222+ Example:
223+ >>> from datetime import timedelta
224+ >>> from runloop_api_client.types.blueprint_build_parameters import BuildContext
225+ >>>
226+ >>> runloop = AsyncRunloopSDK()
227+ >>> obj = await runloop.object_storage.upload_from_dir(
228+ ... "./",
229+ ... ttl=timedelta(hours=1),
230+ ... )
231+ >>> blueprint = await runloop.blueprint.create(
232+ ... name="my-blueprint",
233+ ... dockerfile="FROM ubuntu:22.04\\ nCOPY . .\\ n",
234+ ... build_context=BuildContext(type="object", object_id=obj.id),
235+ ... )
219236 """
220237
221238 def __init__ (self , client : AsyncRunloop ) -> None :
Original file line number Diff line number Diff line change @@ -215,6 +215,23 @@ class BlueprintOps:
215215 ... name="my-blueprint", dockerfile="FROM ubuntu:22.04\\ nRUN apt-get update"
216216 ... )
217217 >>> blueprints = runloop.blueprint.list()
218+
219+ To use a local directory as a build context, use an object.
220+
221+ Example:
222+ >>> from datetime import timedelta
223+ >>> from runloop_api_client.types.blueprint_build_parameters import BuildContext
224+ >>>
225+ >>> runloop = RunloopSDK()
226+ >>> obj = runloop.object_storage.upload_from_dir(
227+ ... "./",
228+ ... ttl=timedelta(hours=1),
229+ ... )
230+ >>> blueprint = runloop.blueprint.create(
231+ ... name="my-blueprint",
232+ ... dockerfile="FROM ubuntu:22.04\\ nCOPY . .\\ n",
233+ ... build_context=BuildContext(type="object", object_id=obj.id),
234+ ... )
218235 """
219236
220237 def __init__ (self , client : Runloop ) -> None :
You can’t perform that action at this time.
0 commit comments