LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithsandbox_async_clientAsyncSandboxClientcreate_snapshot_from_dockerfile
Methodā—Since v0.8

create_snapshot_from_dockerfile

Copy
create_snapshot_from_dockerfile(
  self,
  name: str,
  dockerfile: Union[str, os.
View source on GitHub
PathLike
[
str
]
]
,
fs_capacity_bytes
:
int
,
*
,
context
:
Union
[
str
,
os
.
PathLike
[
str
]
]
=
'.'
,
build_args
:
Optional
[
Mapping
[
str
,
str
]
]
=
None
,
target
:
Optional
[
str
]
=
None
,
on_build_log
:
Optional
[
Callable
[
[
str
]
,
Any
]
]
=
None
,
vcpus
:
Optional
[
int
]
=
None
,
mem_bytes
:
Optional
[
int
]
=
None
,
timeout
:
int
=
60
,
headers
:
RequestHeaders
=
None
)
->
Snapshot

Build a snapshot from a local Dockerfile context.

vcpus and mem_bytes size the temporary builder sandbox. The build runs BuildKit plus the native snapshotter's layer copies inside it, which contend for a single core by default, so giving the builder an extra vCPU can cut a cold build's wall time substantially.