Home

Awesome

Terraform Provider Iterative + Jupyter + TensorBoard

Repository supporting blog: short version on dev.to & full version on hackernoon.com

Painlessly deploy an ML-ready Jupyter server and sync results with your preferred cloud compute provider.

To get started, clone this repo, then in the repo directory run:

export NGROK_TOKEN="..."     # Sign up for free at https://ngrok.com
export TF_LOG_PROVIDER=INFO  # (optional) Control verbosity
terraform init               # Setup local dependencies
terraform apply              # Create cloud resources & upload "shared" workdir
terraform refresh            # Get Jupyter & TensorBoard URLs
# ...
# Have fun!
# (optional) Click "Quit" in Jupyter to shutdown the cloud machine
# ...
terraform destroy # Download "shared" workdir & terminate cloud resources

🛈 Note that it can take a couple of minutes after apply for the machine to be ready.

🛈 Note that Terraform Provider Iterative (TPI) will automatically restart interrupted spot/preemptible instances (including restoring Jupyter's working directory). In such cases, run terraform refresh again to obtain the new Jupyter & TensorBoard URLs.

Requirements

Toggle Version:

<!-- `git checkout generic` for Azure, GCP & K8s -->

Alternatives

Some that we are aware of: (Anything missing? Please do open a PR!)

However there are a few distinct advantages to using terraform over the alternatives: