From 80378966a0c357bde3436be7cc29fed84b89b03c Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 8 May 2024 15:24:44 -0700 Subject: [PATCH] build: add azure resource template --- .../azure_marketplace.zip | Bin 0 -> 2371 bytes .../azure_marketplace/createUiDefinition.json | 15 +++++ .../azure_marketplace/mainTemplate.json | 63 ++++++++++++++++++ deploy/azure_resource_manager/main.bicep | 42 ++++++++++++ .../src/components/settings.tsx | 5 +- 5 files changed, 121 insertions(+), 4 deletions(-) create mode 100644 deploy/azure_resource_manager/azure_marketplace.zip create mode 100644 deploy/azure_resource_manager/azure_marketplace/createUiDefinition.json create mode 100644 deploy/azure_resource_manager/azure_marketplace/mainTemplate.json create mode 100644 deploy/azure_resource_manager/main.bicep diff --git a/deploy/azure_resource_manager/azure_marketplace.zip b/deploy/azure_resource_manager/azure_marketplace.zip new file mode 100644 index 0000000000000000000000000000000000000000..347512586375847e07053f90d3fcde4d4ef4f8a3 GIT binary patch literal 2371 zcmWIWW@Zs#0D+5TDru~T9g`}n^=^cT2hdcn4GE~8p6xKKI@Bh+GZdI z(WMpK42&#a85tPB<^+Jv<6z)GF>f)@Oc|hg@$tTn&i=s>`g-vgMx&T~0@LK=1kvR5 zgrtNIzCK|e_`^B^8ki(9>|p9sRCEkb^El3<@XRgvP=|oH@453= zy>&EBcwW`kIHm7>*87aNAFJkz?LzB*e_meB$PnPo&T)fr>G=?#`#^3)xc)9uXiNfn zP77;jBp0P7mZXMex}>IM=4F;-=I7~U73b%1g8c#tAs9vrrPN;g;6n}q?$vg#Y7viI zbzjP4>bwZxKAvQ2mNNIw{F`?la7=#xu8_s^nD+hZ@3$YX@mRk{@b-e{qR1(|SyNI& z=XMr8NNnfZD`ipAbBxX0V&%Itdn6d&=IktgcQj7ME{4xNw=4>hUv1+YesfGJC@r z&wDQz_V_Mq3o9_ZI$t5>bI8U2Gyh4&Hh+JV+~R8ZZ~4N@H(nZ;Kk5;(+P33or^TOB zo92Jr4+_m$z0*3b0YefLX4pd$6wao|X#pc808)tv{bz!$_ z-00(Zf5jQD|1UXbNhmSMzB@2|*|SwXJKlZg^r9`mdg>JT`ukS zutGM6vT-G-! z?EmOyoa5MfdQ1d5ZMVi-GQ=`9--`nKM4+4K4N4NVa8qg06hiIM6_9xR46+c}&!Bt& h14|lLvl8$#e!H>ciU4m`U_NAEU<1NUz!0ql^8mqoUL61c literal 0 HcmV?d00001 diff --git a/deploy/azure_resource_manager/azure_marketplace/createUiDefinition.json b/deploy/azure_resource_manager/azure_marketplace/createUiDefinition.json new file mode 100644 index 000000000..4eba73bdb --- /dev/null +++ b/deploy/azure_resource_manager/azure_marketplace/createUiDefinition.json @@ -0,0 +1,15 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", + "handler": "Microsoft.Azure.CreateUIDef", + "version": "0.1.2-preview", + "parameters": { + "config": { + "isWizard": false, + "basics": { } + }, + "basics": [ ], + "steps": [ ], + "outputs": { }, + "resourceTypes": [ ] + } +} \ No newline at end of file diff --git a/deploy/azure_resource_manager/azure_marketplace/mainTemplate.json b/deploy/azure_resource_manager/azure_marketplace/mainTemplate.json new file mode 100644 index 000000000..114e855bf --- /dev/null +++ b/deploy/azure_resource_manager/azure_marketplace/mainTemplate.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "imageName": { + "type": "string", + "defaultValue": "ghcr.io/berriai/litellm:main-latest" + }, + "containerName": { + "type": "string", + "defaultValue": "litellm-container" + }, + "dnsLabelName": { + "type": "string", + "defaultValue": "litellm" + }, + "portNumber": { + "type": "int", + "defaultValue": 4000 + } + }, + "resources": [ + { + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2021-03-01", + "name": "[parameters('containerName')]", + "location": "[resourceGroup().location]", + "properties": { + "containers": [ + { + "name": "[parameters('containerName')]", + "properties": { + "image": "[parameters('imageName')]", + "resources": { + "requests": { + "cpu": 1, + "memoryInGB": 2 + } + }, + "ports": [ + { + "port": "[parameters('portNumber')]" + } + ] + } + } + ], + "osType": "Linux", + "restartPolicy": "Always", + "ipAddress": { + "type": "Public", + "ports": [ + { + "protocol": "tcp", + "port": "[parameters('portNumber')]" + } + ], + "dnsNameLabel": "[parameters('dnsLabelName')]" + } + } + } + ] + } \ No newline at end of file diff --git a/deploy/azure_resource_manager/main.bicep b/deploy/azure_resource_manager/main.bicep new file mode 100644 index 000000000..b104cefe1 --- /dev/null +++ b/deploy/azure_resource_manager/main.bicep @@ -0,0 +1,42 @@ +param imageName string = 'ghcr.io/berriai/litellm:main-latest' +param containerName string = 'litellm-container' +param dnsLabelName string = 'litellm' +param portNumber int = 4000 + +resource containerGroupName 'Microsoft.ContainerInstance/containerGroups@2021-03-01' = { + name: containerName + location: resourceGroup().location + properties: { + containers: [ + { + name: containerName + properties: { + image: imageName + resources: { + requests: { + cpu: 1 + memoryInGB: 2 + } + } + ports: [ + { + port: portNumber + } + ] + } + } + ] + osType: 'Linux' + restartPolicy: 'Always' + ipAddress: { + type: 'Public' + ports: [ + { + protocol: 'tcp' + port: portNumber + } + ] + dnsNameLabel: dnsLabelName + } + } +} diff --git a/ui/litellm-dashboard/src/components/settings.tsx b/ui/litellm-dashboard/src/components/settings.tsx index f8f57897e..ff7e07005 100644 --- a/ui/litellm-dashboard/src/components/settings.tsx +++ b/ui/litellm-dashboard/src/components/settings.tsx @@ -341,7 +341,7 @@ const Settings: React.FC = ({ return (
- + @@ -353,9 +353,6 @@ const Settings: React.FC = ({ - - Presidio + Guardrails coming soon -