ersilia.publish package¶
Subpackages¶
Submodules¶
ersilia.publish.deploy module¶
ersilia.publish.dockerhub module¶
- class ersilia.publish.dockerhub.DockerHubUploader(model_id: str, config_json=None)[source]¶
Bases:
ErsiliaBase
Class for uploading Docker images to DockerHub.
- Parameters:
model_id (str) – The ID of the model to be uploaded.
config_json (str, optional) – Path to the configuration JSON file.
Examples
uploader = DockerHubUploader( model_id="model_id", config_json="path/to/config.json", ) uploader.set_credentials( docker_user="username", docker_pwd="password" ) uploader.upload()
ersilia.publish.publish module¶
ersilia.publish.rebase module¶
- class ersilia.publish.rebase.TemplateRebaser(model_id: str, template_repo='eos-template', config_json=None, credentials_json=None)[source]¶
Bases:
ErsiliaBase
Class for rebasing model repositories with a template repository.
- Parameters:
model_id (str) – The ID of the model to be rebased.
template_repo (str, optional) – The name of the template repository. Default is ‘eos-template’.
config_json (str, optional) – Path to the configuration JSON file.
credentials_json (str, optional) – Path to the credentials JSON file.
ersilia.publish.s3 module¶
- class ersilia.publish.s3.S3BucketRepoUploader(model_id: str, config_json=None)[source]¶
Bases:
ErsiliaBase
Class for uploading model repositories to an S3 bucket.
- Parameters:
model_id (str) – The ID of the model to be uploaded.
config_json (str, optional) – Path to the configuration JSON file.
Examples
uploader = S3BucketRepoUploader( model_id="model_id", config_json="path/to/config.json", ) uploader.set_credentials( aws_access_key_id="access_key", aws_secret_access_key="secret_key", ) uploader.upload()
- set_credentials(aws_access_key_id: str, aws_secret_access_key: str)[source]¶
Set AWS credentials.
- Parameters:
aws_access_key_id (str) – AWS access key ID.
aws_secret_access_key (str) – AWS secret access key.
ersilia.publish.store module¶
Class used to store model when done developing it.
This functionality is used when developing of a model is done.
- class ersilia.publish.store.ModelRemover(config_json=None, credentials_json=None)[source]¶
Bases:
ErsiliaBase
Class for removing models from OSF.
- Parameters:
config_json (str, optional) – Path to the configuration JSON file.
credentials_json (str, optional) – Path to the credentials JSON file.
Examples
remover = ModelRemover( config_json="path/to/config.json", credentials_json="path/to/credentials.json", ) remover.remove(model_id="model_id")
- class ersilia.publish.store.ModelStorager(config_json=None, credentials_json=None, overwrite=True)[source]¶
Bases:
ErsiliaBase
Class for storing models in the local data directory and in OSF.
- Parameters:
config_json (str, optional) – Path to the configuration JSON file.
credentials_json (str, optional) – Path to the credentials JSON file.
overwrite (bool, optional) – Whether to overwrite existing files. Default is True.