Code Monkey home page Code Monkey logo

Comments (16)

nitinya9av avatar nitinya9av commented on May 22, 2024 2

Thanks!! @brsilvarec
For all Azure student subscription holders, you have the option to utilize the vm_size parameter to vm_size=Standard_DS3_v2 .
VM setup is successful.
πŸ‘ŒπŸ‘

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

Hi there @nitinya9av,

Thanks for sharing this. I believe you need to create the SSH public key. As stated in the documentation you need to create it using the ssh-keygen command and use the default options. Please, see the following figure that shows how to proceed. After creating the public key and logging into azure, you should be able to create the VM.

image

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

Please, be advised this will create a SSH key that will be only accessible while you have the container is running. If you loose the container your will have no way to connect to your VM.

I recommend you use a more stable platform like a Linux machine (WSL can be an option) to create the FarmVibes.AI vm.

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

You also need to clone the repository and execute the azure deployment command inside the farmvibes-ai folder.

image

My Recommendation is to do the following.

  1. Use a more stable Linux environment to deploy the FarmVibes.AI VM.
  2. Once you create/access this environment, issue the ssh-keygen command.
  3. Clone the repository and enter the folder.
  4. Log into the azure cli using a valid subscription.
  5. Create the VM using the command you pasted..

Please, let me know if this worked for you.

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

If you really want to use a container to create the VM, you can use a volume to persist the SSH key in your windows host. In the following example, I created a folder that will persist the ssh keys (C:\Users\brunosilva\Documents\ssh). Please, replace this folder with a valid folder in your system.

image

This command created the container, generated the SSH key, and killed the container.

Observe when I created the container again, my SSH public key was there. Without the volume, the SSH public key would not be there.

from farmvibes-ai.

nitinya9av avatar nitinya9av commented on May 22, 2024

I am using WSL Ubuntu 20.04(as you recommended) but while running this volume command get an error.
Screenshot (176)

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

Hi @nitinya9av,

If your running on WSL, there is no need to add the volume or even create the container. Container + volume creation is only required if you are using a windows machine.

Please try consider installing azure cli on your Ubuntu WSL, this command curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash should do the job. After doing that, proceed as explained here.

#18 (comment)

Please let me know if this worked or not ... I am glad to help

from farmvibes-ai.

nitinya9av avatar nitinya9av commented on May 22, 2024

Now, I am using WSL ubuntu 20.04 (without the docker container) as you recommend and after following 4 steps that you mentioned

My Recommendation is to do the following.

  1. Use a more stable Linux environment to deploy the FarmVibes.AI VM.
  2. Once you create/access this environment, issue the ssh-keygen command.
  3. Clone the repository and enter the folder.
  4. Log into the azure cli using a valid subscription.
  5. Create the VM using the command you pasted.

but at step 5 I am getting this

Screenshot (178)

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

Thanks for your quick response.

It seems your bicep was not installed properly. Can you run this command?

az bicep upgrade

If this does not work, please consider reinstalling azure cli.

from farmvibes-ai.

nitinya9av avatar nitinya9av commented on May 22, 2024

Hi @brsilvarec
First I run az bicep upgrade command and get this
Screenshot (179)
then I reinstall azure cli with both methods and get the same error.

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

It seems there is something wrong with your azure cli installation. This kind of error usually happens when we try to execute some software in a wrong platform.

According to your terminal screenshot you are using Ubuntu, then this should be the platform
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt

image

My recommendation is to uninstall the azure cli at the end of pointed page and try again.

This is the expected behavior for a successful azure cli installation.

β•°β”€βž€  az bicep --help                                                                                                             2 ↡

Group
    az bicep : Bicep CLI command group.

Commands:
    build         : Build a Bicep file.
    decompile     : Attempt to decompile an ARM template file to a Bicep file.
    install       : Install Bicep CLI.
    list-versions : List out all available versions of Bicep CLI.
    publish       : Publish a bicep file to a remote module registry.
    uninstall     : Uninstall Bicep CLI.
    upgrade       : Upgrade Bicep CLI to the latest version.
    version       : Show the installed version of Bicep CLI.

To search AI knowledge base for examples, use: az find "az bicep"

You have 3 updates available. Consider updating your CLI installation with 'az upgrade'

Please let us know how we are doing: https://aka.ms/azureclihats

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

Please, also consider taking a looking at this troubleshooting page related to Azure CLI on WSL. https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt#cli-fails-to-install-or-run-on-windows-subsystem-for-linux

from farmvibes-ai.

nitinya9av avatar nitinya9av commented on May 22, 2024

The Above problem is solved by first uninstalling bicep using the command az bicep uninstall and then reinstalling it.
but now, I have a new error in my azure quota I have an azure for student subscription which only allows 6 vCPUs is there any way that I can run farmvibes.ai on 6 vCPUs instead of 8 vCPUs?

Screenshot (180)

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

You can use the parameter vm_size after encoded_script. I selected a Standard_DC4s_v3 but you can try another instance.

az deployment group create --resource-group <resource_group> \
  --name <deployment_name> \
  --template-file  resources/vm/farmvibes_ai_vm.bicep \
  --parameters \
           ssh_public_key="$(cat ~/.ssh/id_rsa.pub)" \
           vm_suffix_name=<my_test_suffix> \
           encoded_script="$(cat resources/vm/setup_farmvibes_ai_vm.sh | gzip -9 | base64 -w0)" \
           vm_size=Standard_DC4s_v3

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

BTW, you can check out tutorial video showing how to set up the parameters for the FarmVibes.AI VM.

https://youtu.be/RNoA7ri2v5I?t=1811

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 22, 2024

Thanks @nitinya9av

from farmvibes-ai.

Related Issues (20)

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.