A Package is a Runhouse primitive for sharing code between various systems (ex: s3, cluster, local).
Builds an instance of Package
.
name (str) – Name to assign the package resource.
install_method (str) – Method for installing the package. Options: [pip
, conda
, reqs
, local
]
install_str (str) – Additional arguments to install.
path (str) – URL of the package to install.
system (str) – File system or cluster on which the package lives. Currently this must a cluster or one of:
[file
, github
, sftp
, ssh
, s3
, gs
, azure
].
dryrun (bool) – Whether to create the Package if it doesn’t exist, or load the Package object as a dryrun.
(Default: False
)
local_mount (bool) – Whether to locally mount the installed package. (Default: False
)
data_config (Optional[Dict]) – The data config to pass to the underlying fsspec handler.
The resulting package.
Example
>>> import runhouse as rh
>>> reloaded_package = rh.package(name="my-package")
>>> local_package = rh.package(path="local/folder/path", install_method="local")
Builds an instance of GitPackage
.
name (str) – Name to assign the package resource.
git_url (str) – The GitHub URL of the package to install.
revision (str) – Version of the Git package to install.
install_method (str) – Method for installing the package. If left blank, defaults to local installation.
install_str (str) – Additional arguments to add to installation command.
dryrun (bool) – Whether to load the Package object as a dryrun, or create the Package if it doesn’t exist.
(Default: False
)
The resulting GitHub Package.
Example
>>> rh.git_package(git_url='https://github.com/runhouse/runhouse.git',
>>> install_method='pip', revision='v0.0.1')
- __init__(name: str | None = None, git_url: str | None = None, install_method: str | None = None, install_args: str | None = None, revision: str | None = None, dryrun: bool = False, **kwargs)[source]
Runhouse Github Package resource.
Note
To create a git package, please use the factory method
git_package()
orpackage()
.