Code Monkey home page Code Monkey logo

Comments (3)

brsilvarec avatar brsilvarec commented on May 18, 2024

Hi @richstep,

Thanks for trying to use our project. Apparently, I managed to replicate the issue you are having. In my case, I copied the VM setup script without the last line.

Instead of using

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)"

I used this

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> \

Observe the missing encoded_script="$(cat resources/vm/setup_farmvibes_ai_vm.sh | gzip -9 | base64 -w0)" line.

image

Please, also certify yourself you are using the repository root when trying to execute the command. I believe executing the full command should fix the issue.

Please, let me know if this solves your issue...

from farmvibes-ai.

richstep avatar richstep commented on May 18, 2024

When I run it via WSL I get a working VM with git, python, and docker installed. When I run it in Windows via Powershell 7, I get the same error. I think it's because I don't have gzip installed, which looks like a complicated install.

I worked around the gzip issue and got a working VM by using 7zip.

First compress the .sh file in gzip format:
& "C:\Program Files\7-Zip\7z.exe" a -tgzip -mx=5 setup_farmvibes_ai_vm.gz resources/vm/setup_farmvibes_ai_vm.sh

Then convert it to base64:
$encodedScript = [Convert]::ToBase64String([System.IO.File]::ReadAllBytes("C:\Users\xxxxxx\source\repos\github\farmvibes-ai\setup_farmvibes_ai_vm.gz"))

Finally the creation of the VM:
az deployment group create --resource-group xxxxxxx --name dep006 --template-file resources/vm/farmvibes_ai_vm.bicep --parameters ssh_public_key="$(cat ~/.ssh/xxxxxx.pub)" vm_suffix_name="xxxx" encoded_script=$encodedScript

gzip error message:
image

from farmvibes-ai.

brsilvarec avatar brsilvarec commented on May 18, 2024

Thanks for you input @richstep. Happy to know you worked around it.

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.