Image instance.Image.base()123456789from opencomputer import Image image = ( Image.base() .apt_install(["curl", "jq"]) .pip_install(["requests", "pandas"]) .env({"PROJECT_ROOT": "/workspace"}) .workdir("/workspace") )
Imageimage.apt_install(packages)body packageslist[str]requiredImageimage.pip_install(packages)body packageslist[str]requiredImageimage.run_commands(*cmds)body cmdsstr (variadic)requiredImageimage.env(vars)body varsdict[str, str]requiredImageimage.workdir(path)body pathstrrequiredImageimage.add_file(remote_path, content)body remote_pathstrrequiredbody contentstrrequiredImageimage.add_local_file(local_path, remote_path)body local_pathstrrequiredbody remote_pathstrrequiredImageimage.add_local_dir(local_path, remote_path)body local_pathstrrequiredbody remote_pathstrrequiredImageimage.builder_memory(mb)apt/pip/npm). Defaults to 4096. Does not affect the resulting
sandbox's memory — size that at create time via memory_mb.body mbintrequiredImageimage.to_dict()dictimage.cache_key()str