Git Product home page Git Product logo

azure-arm-polynote-vm's Introduction

Azure VM - Polynote Server

This is an example template to deploy an Azure virtual machine running Polynote.

The simplest way to deploy is to just click the "Deploy to Azure" button here. Read on if you want to do it from the command line instead.

Deploy to Azure

And you end up with the following ready to go

Polynote VM

Deploying using the CLI

The following commands can be used to deploy the template from the command line using the Azure CLI.

# Create a resource group to deploy the virtual machine to
az group create -g <resource group name> -l <location name>

# For example
az group create -g polynote -l northeurope

# Deploy the template
az deployment group create \
    -g <resource group name> \
    --template-file azuredeploy.bicep \
    --parameters resourcePrefix='tstvm' clientIpAddress='<your ip address>' vmAdminUser='<admin username>' vmAdminPass='<admin password>' \
    --verbose

As Polynote currently does not have any built-in security, the template creates a network security group blocking access except for a given IP address on ports 22 (SSH) and 8192 (Polynote). You can find your IP address using a service such as ipify.

By default the template will deploy a Standard_D2s_V3 server running Ubuntu 18.04 LTS. The size of the VM can be changed to any of those available in your region which can be found using the following Azure CLI command.

az vm list-sizes -o table

When the deployment is complete the polynote service should be started, so you can point your browser to http://<vm name>.<region>.cloudapp.azure.com:8192 and start playing. You can also SSH onto the virtual machine and have a look around.

N.B. The default port for Polynote is 8192, if you want to change this you will need to modify the YAML configuration file as per the documentation.

You can find the DNS name for your VM either via the Azure Portal or from the command line.

# Get the VM details and filter to the name and fully qualified DNS
az vm list -g <resource group name> -d --query "[].{name: name, fqdns: fqdns}" --output table

Available VM sizes

If you want to filter this list based on number of cores or memory available then you can do this using the --query parameter which utilizes JMESPath. Remember to change the location to the Azure region you want to deploy to.

N.B. All commands are outputting in a table format for ease of reading.

Getting available locations

You can list the locations available to you as an option using the Azure CLI as follows.

az account list-locations --output table

Querying for VM sizes

For example, to find all DS_v3 series sizes with more than 8Gb of memory in North Europe you could use the following query.

az vm list-sizes --location northeurope --query "[?starts_with(name, 'Standard_D') && ends_with(name, 's_v3') && memoryInMb > `8192`]" -o table

REMEMBER if you're using Powershell to query using the Azure CLI you will need to escape the back ticks (see the memory part of the query below).

az vm list-sizes --location northeurope --query "[?starts_with(name, 'Standard_D') && ends_with(name, 's_v3') && memoryInMb > ``8192``]" -o table

Based on my own subscription this outputs the following (at the time of writing):

Name NumberOfCores OsDiskSizeInMb ResourceDiskSizeInMb MemoryInMb MaxDataDiskCount
Standard_D4s_v3 4 1047552 32768 16384 8
Standard_D8s_v3 8 1047552 65536 32768 16
Standard_D16s_v3 16 1047552 131072 65536 32
Standard_D32s_v3 32 1047552 262144 131072 32
Standard_D48s_v3 48 1047552 393216 196608 32
Standard_D64s_v3 64 1047552 524288 262144 32

azure-arm-polynote-vm's People

Contributors

dazfuller avatar

Watchers

 avatar

azure-arm-polynote-vm's Issues

Python dependencies

At the moment the dependencies are taken from the polynote documentation page, but the release artefact has it's own requirements.txt file. This should be used in preference to manually setting up dependencies.

Examples

Polynote comes with an examples directory, this should be "mounted" in the deployed polynote instance to make it available to users.

Located at: /opt/polynote/examples

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.