/az_ds_dev_vm

Terraform scripts to spool up a Data Science dev box in Azure

Primary LanguageShell

Azure AI / Data Science VM

Terraform scripts to spool up an AI / Data Science dev box in Azure.

Prerequisites

  • Terraform and Azure CLI installed
  • If this is run from within WSL2, DNS needs to be disabled as there is currently an issue in conjunction with Terraform
  • The Terraform script assumes that an SSH key public key exists under ~/.ssh/id_rsa.pub.

Deploy the VM with Terraform

terraform init
az login
terraform plan -out main.tfplan
terraform apply "main.tfplan"

# Wait for it...

# Get the public IP:
terraform output public_ip_address

# Sign in via SSH.

ssh sral@<public ip address>

TODO

[ ] Use Codespaces encrypted secrets: https://docs.github.com/en/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces

Usage

Check installation status

less /var/log/cloud-init-output.log

On the VM

Run Jupyter lab:

jupyter lab

Client

On the client, open an SSH tunnel to connect to JupyterLab:

ssh -N -L 8888:localhost:8888 {user]@{host}

Then point your browser to https://localhost:8888

Cleanup

terraform apply -destroy

Links