Highlights
* AWS Sagemaker Cluster (105 115 166)
* facilitates easy access to existing or new AWS SageMaker compute
* HTTPS support (Alpha) (114)
* adds option for starting up the Runhouse API server on the cluster with HTTPS
Sagemaker Cluster
Runhouse is integrating with [Amazon Web Services (AWS) SageMaker](https://aws.amazon.com/sagemaker) to allow rapid onboarding onto SageMaker, usually within minutes, and to remove the need to translate code into SageMaker-specific APIs so it can still be used dynamically with other compute infra.
The [SageMaker cluster](https://www.run.house/docs/api/python/cluster) follows the Runhouse cluster definition and usage, but uses Sagemaker compute under the hood.
If you already use SageMaker with your AWS account, you should already be set to use Runhouse SageMaker support. For full SageMaker setup and dependencies, please refer to the [docs](https://www.run.house/docs/api/python/cluster#sagemaker-hardware-setup).
Example 1: Launch a new SageMaker instance and keep it up indefinitely.
Note: this will use Role ARN associated with the "sagemaker" profile defined in the local AWS config (e.g. `~/.aws/config`).
import runhouse as rh
c = rh.sagemaker_cluster(name='sm-cluster', profile="sagemaker").save()
Example 2: Running a training job with a provided Estimator
c = rh.sagemaker_cluster(name='sagemaker-cluster',
estimator=PyTorch(entry_point='train.py',
role='arn:aws:iam::123456789012:role/MySageMakerRole',
source_dir='/Users/myuser/dev/sagemaker',
framework_version='1.8.1',
py_version='py36',
instance_type='ml.p3.2xlarge'),
).save()
Support HTTPS calls to clusters (Alpha)
Adds an option for starting up the Runhouse API server on the cluster with HTTPS, including optionally creating self-signed certs and proxying through Nginx. This makes it incredibly fast and easy to stand up a microservice with standard bearer token authentication (using a Runhouse token), allowing users to share Runhouse resources with collaborators, teams, customers, etc.
Supports several new server connection types, including `tls`, `ssh`. For more information on these types, please refer to [docs](https://github.com/run-house/runhouse/blob/main/docs/api/python/cluster.rst#server-connection).
BC Breaking
* The default Runhouse HTTP server port is now `32300` (124)
Other
* Remove the `paramiko` dependency for password clusters (131)
* Support running shell commands in `env` (132)
Example code:
rh.env(
name="my_env",
reqs=["torch", "diffusers"],
setup_cmds=["source ~/.bashrc"]
)
* Support an optional `host` parameter for the `runhouse start` and `runhouse restart` commands, which now defaults to `0.0.0.0` (110)
Example code: