Friday, June 13, 2025

download and run an AWS VM snapshot locally on Virtualbox

We took a lot of time to accomplish this - run an AWS VM snapshot locally on Virtualbox and test if all the services are working - apache, mysql, dotnet, wordpress on php. Taking help from ChatGPT, the working method is outlined below.


2. Export the ami as vmdk - Copy-pasting below from Gemini's howto - (our initial attempts to do the export failed, as the role named "vmimport" had not been created with the required permissions. We could use an AWS cloud shell for the aws cli steps.) 

You can export an AWS AMI as a VMDK file using the AWS VM Import/Export service. This process involves exporting the AMI to an Amazon S3 bucket, from where you can then download the VMDK file.

Here's a detailed breakdown of the steps and important considerations:

1. Prerequisites and Limitations:

Before you start, be aware of these crucial points:

  • AWS CLI: You'll primarily use the AWS Command Line Interface (CLI) for this process, as it's the most common and robust way to manage VM Import/Export tasks. Ensure you have it installed and configured with appropriate AWS credentials.
  • S3 Bucket: You need an Amazon S3 bucket in the same AWS Region as your AMI to store the exported VMDK file.
  • IAM Role (vmimport): AWS VM Import/Export requires an IAM service role (typically named vmimport) with the necessary permissions to read from and write to your S3 bucket. If you don't have this, you'll need to create it. AWS documentation provides the required trust policy and permissions.
  • AMI Export Limitations:
    • Not all AMIs can be exported. You generally cannot export AMIs that contain third-party software provided by AWS (e.g., Windows or SQL Server images, or any AMI from the AWS Marketplace), unless they were originally imported as "Bring Your Own License" (BYOL) through VM Import/Export or AWS Application Migration Service (MGN)/AWS Elastic Disaster Recovery (AWS DRS).
    • You cannot export an AMI with encrypted EBS snapshots.
    • VMs with volumes larger than 1 TiB might have limitations (though for larger disks, you might need a manifest file).
    • You can't export an AMI if you've shared it from another AWS account.
    • You can't have multiple export image tasks in progress for the same AMI simultaneously.
    • Volumes attached after instance launch are not exported; only those specified in the AMI's block device mapping are included.
  • Consistent AMI: For the best results, ensure your AMI was created from a stopped instance or an application-consistent snapshot to avoid data corruption in the exported VMDK.

2. Steps to Export the AMI as VMDK:

a. Create an S3 Bucket (if you don't have one):

You can do this via the AWS Management Console or AWS CLI.

AWS Console:

  1. Go to the S3 service.
  2. Click "Create bucket."
  3. Provide a unique bucket name.
  4. Choose the same AWS Region as your AMI.
  5. Keep "Block all public access" enabled unless you have a specific reason to disable it (and understand the security implications).
  6. Click "Create bucket."

AWS CLI:

Bash
aws s3 mb s3://your-export-bucket-name --region your-aws-region

b. Create the IAM Role (if you don't have one):

This is crucial for allowing AWS VM Import/Export to interact with your S3 bucket.

  1. Create a trust policy file (trust-policy.json):
    JSON
    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": {
            "Service": "vmie.amazonaws.com"
          },
          "Action": "sts:AssumeRole",
          "Condition": {
            "StringEquals": {
              "sts:ExternalId": "vmimport"
            }
          }
        }
      ]
    }
    

2.1 Create the IAM role (vmimport):

bash aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json

3. Create an inline policy file (role-policy.json):

Replace your-export-bucket-name with your actual bucket name.

json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetBucketLocation", "s3:ListBucket", "s3:GetObject" ], "Resource": [ "arn:aws:s3:::your-export-bucket-name", "arn:aws:s3:::your-export-bucket-name/*" ] }, { "Effect": "Allow", "Action": [ "s3:CreateBucket", "s3:PutObject", "s3:PutObjectAcl" ], "Resource": [ "arn:aws:s3:::your-export-bucket-name", "arn:aws:s3:::your-export-bucket-name/*" ] }, { "Effect": "Allow", "Action": [ "ec2:DescribeTags", "ec2:CreateTags" ], "Resource": "*" } ] }

4. Attach the inline policy to the vmimport role:

bash aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file://role-policy.json

c. Start the Export Image Task:

Use the export-image command with the AWS CLI.

Bash
aws ec2 export-image \
    --image-id ami-0123456789abcdef0 \
    --disk-image-format VMDK \
    --s3-export-location S3Bucket=your-export-bucket-name,S3Prefix=exports/ \
    --description "Exported VMDK from MyWebApp AMI"
  • Replace ami-0123456789abcdef0 with the actual ID of your AMI.
  • Replace your-export-bucket-name with the name of your S3 bucket.
  • S3Prefix=exports/ is optional but good practice to organize your exported files within the bucket.
  • --disk-image-format VMDK specifies the output format. You can also choose VHD or RAW.

d. Monitor the Export Task:

The export process can take some time, depending on the size of your AMI. You can check the status using the describe-export-image-tasks command:

aws ec2 describe-export-image-tasks 

The Status field will show the progress (e.g., active, completed, deleting, deleted). Wait until the status changes to completed.


3. Download the vmdk - for this, I tried s3cmd which didn't work, based on this discussion. Just installing aws cli with the method outlined here, and 

aws s3 cp  s3://our-vm-export-2025/exports/export-ami-our-vmdk-file.vmdk localfile.vmdk

worked, after 

aws configure 

and entering the access key and secret key (which PB had to generate and give me). 

4. Running the vmdk and verifying it - It turned out that just creating a new VM with the VMDK file as the root file system - (under advanced) - would make it run, but the network interface provided by Virtualbox would be different from that provided by AWS EC2 - so, had to log on to the console. Since there was no password set (or I couldn't remember it), followed this chroot procedure to set a password for root user. For mounting the VMDK file, the easiest way was to go to another virtualbox vm, and in that vm, add this vmdk with a higher SCSI port number as an additional disk - under Settings - Storage for that VM. 

(qemu-img convert -f vmdk -O raw aws-image.vmdk aws-image.raw etc and mounting with a loop filesystem was very very time consuming, since our hard disk was slow. Hence, avoid this method.)

Then, we could log in, and as prompted by chatgpt, modify the cloud-init file - copy-pasting below - 

ip link # to check for interfaces without having ifconfig installed

#Update /etc/netplan/ (for Ubuntu 18.04+, or /etc/network/interfaces for older systems).

Example for Netplan (Ubuntu):

network:

  version: 2

  ethernets:

    enp0s3:

      dhcp4: true

In our case, there was an extra 

set-name: ens5

line which needed to be commented out. Then,

sudo netplan apply

ip a # to check if the interface is up, and if it is down,

sudo ip link set enp0s3 up

and now 

ip a 

should show that the interface has an ip address via dhcp. 

In this case, we tested the VM with NAT networking, with port forwarding set on Virtualbox Settings - Network - 2244 for ssh, 8080 for 80, 8443 for 443.

Then, setting /etc/hosts with the ip address of the host - 192.168.1.6 in this case for the various domains we wished to test, the dotnet app worked fine. Wordpress refused to connect - apparently NATted requests are refused by Wordpress by default, and we would need to make some changes to the config file to make it accept such requests to port 8443, like editing wp-config.php with the lines 

define('WP_HOME', 'https://our.domain.org:8443');

define('WP_SITEURL', 'https://our.domain.org:8443');




using 'ChatGPT' instead of 'Googling'

 Nowadays, many queries can be more accurately answered by Copilot or ChatGPT or Gemini rather than just doing a web search - for eg, we could just copy-paste error messages which we got on trying to run an AWS VM image with virtualbox, and chatgpt gave accurate fixes. Gemini / Copilot providing links to references is another very useful feature, using which we can double-check if the references match our environment etc.

Wednesday, June 11, 2025

no python found

When getting the error "no python found" even after 
sudo apt-get install python
"python is already the newest version." 

https://stackoverflow.com/questions/3655306/ubuntu-usr-bin-env-python-no-such-file-or-directory

If Python 3 is not installed, install it: sudo apt-get install python3

Then, a good option is to install sudo apt install python-is-python3

Or, invoke python3 instead of just python. Or, create a symlink 

whereis python3
sudo ln -s /usr/bin/python3 /usr/bin/python

Wednesday, June 04, 2025

simple http server for debugging, in one line of python

 https://linuxconfig.org/running-a-simple-http-web-server-with-one-terminal-command-and-python

We just need to run the following line in the directory which we want as the server's home directory - 

python3 -m http.server --bind 127.0.0.1 9000

Used this while troubleshooting OpenSpace showcomposer ui issues.

Saturday, May 31, 2025

git error remote origin already exists

 Via https://dev.to/devmercy/four-ways-to-solve-the-remote-origin-already-exists-error-1f2

git remote remove origin

git remote set-url origin https://github.com/newgit/url.git

Or, we can, instead of removing the URL called origin, rename it,

git remote rename origin backup

Or we might have already set the origin correctly, which we can then check using

git remote -v

which will list all remotes.

Tuesday, May 27, 2025

a lot of github workflows

Learnt a lot about many different workflows, how to get various things done, which can be used in future for incorporating into various projects.


automated deb creation with auto dependency detection

Apparently, CMake can do some automation for us - with CMake,
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)

for more info

Example of multi-package build on github actions - 

build opencv with cuda support

Package 'libtbb2' has no installation candidate
Trying
libtbbmalloc2


https://gist.github.com/kanaryayi/115731930a9767d8607374552993bad3 - Install OpenCV 4.9 with CUDA support - this gist has some build flags which are useful, and also dependencies.

CUDA backend requires CUDA Toolkit - we need to download it from the NVIDIA website.
https://developer.nvidia.com/cuda-toolkit

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cudnn cuda-toolkit

get url from
(deb network install)

More options are at

CMake Warning at /home/sssvv/opencv_contrib/modules/cudacodec/CMakeLists.txt:26 (message):
  cudacodec::VideoReader requires Nvidia Video Codec SDK.  Please resolve
  dependency or disable WITH_NVCUVID=OFF


CMake Warning at /home/sssvv/opencv_contrib/modules/cudacodec/CMakeLists.txt:30 (message):
  cudacodec::VideoWriter requires Nvidia Video Codec SDK.  Please resolve
  dependency or disable WITH_NVCUVENC=OFF

But this page says,
"FFMPEG is a cross-platforms solution to record, convert, and stream audio and video. FFMPEG supports video hardware acceleration on NVIDIA GPUs."

So do we really need cuda support? (for using NVidia nvenc codec with opencv)
I've put in a question at the OpenCV forum, no answers so far.

Maybe I can try downloading the Nvidia Video Codec SDK, compile OpenCV with that, and then try again.

Learnt how to build with Windows / Linux, building the latest OpenCV and ffmpeg from source, 
Windows workflow - setting PKG_CONFIG_PATH is important here.
Linux workflow - uses actions/cache to cache OpenCV once it is built.

ffmpeg linking on Windows


choco install ffmpeg has the issue that the pc files are not present - mention of pc files here,

Solution was to download from https://github.com/BtbN/FFmpeg-Builds/



Make CMake display a message on the console

Equivalent of echo "our hello world" would be message("our hello world")https://cmake.org/cmake/help/book/mastering-cmake/chapter/Writing%20CMakeLists%20Files.html

android apps without android studio

Directly building android apps on github actions - for learning, there is gradle init as mentioned at https://medium.com/@sdiony/can-you-really-develop-android-apps-without-android-studio-cdd9b951de65
but copy-pasting from existing projects, samples, is much easier - 
https://github.com/hn-88/OpenCV-android-samples
https://github.com/hn-88/android-ndk-samples/








Saturday, May 17, 2025

Indian income tax filing - a good overview guide

 Valueresearch has a good guide on what to keep ready, at https://www.valueresearchonline.com/stories/224462/income-tax-return-filing-preparation/

  1. Form16
  2. Form 26AS
  3. Capital gains statements
  4. Interest certificates
  5. Investment / donation proofs (for old tax regime)
  6. Loan interest certificates - home loan, EV loan interest may have deductions
  7. Bank account details
  8. Wait till AIS / TIS / 26AS is ready to avoid re-filing
While I knew about the other points, I was not very clear about significance of 26AS, and how to access TIS etc. AIS = Annual Information Statement, TIS = Taxpayer Information Summary according to this FAQ page which has lots of information - https://www.incometax.gov.in/iec/foportal/ais-faq 

Edit: 17th May 2025 - the TIS / AIS for me has info from LIC, SBI and HDFC as well as the mutual fund companies, but not from Canara Bank (savings bank interest.) I guess Canbank's reporting system to the government is not fully functional.

I can check / reconcile the following from TIS - 
  1. Interest - Savings Bank
  2. Interest - Deposits
  3. LIC receipts
  4. MF sale
  5. MF purchase

Friday, May 16, 2025

diskpart instead of fdisk on windows 11

As the title suggests, used diskpart to delete an EFI partition, since fdisk is no longer bundled with Windows 11. An earlier post has the syntax - https://hnsws.blogspot.com/2023/09/delete-efi-partition-with-windows.html

Then also created a partition and formatted it within diskpart, https://adminhowto.com/how-to-reformat-a-usb-drive-using-windows-diskpart/

create partition primary
format fs=fat32 quick

Thursday, May 15, 2025

refreshed github token

 Refreshed a github personal access fine-grained token by logging on to the relevant account and going to https://github.com/settings/personal-access-tokens/

For uploading files to a repository, the permissions needed are:

User permissions: None

Per-repository permissions: (for the relevant repo) 

Read access to metadata
Read and write access to actions, code, and workflows.

The post about google apps script code to auto-upload to github-pages is at https://hnsws.blogspot.com/2024/03/workaround-for-cors-errors-on-api-calls.html 

Friday, May 09, 2025

qemu for arm64 on x86_64 Linux machine

This is just documenting the various points to note, trials, errors etc when I tried to run arm64 on x86_64 using qemu. This post does not have a very satisfactory ending - the VM was far too slow for me to try OpenSpace or OCVWarp or anything else for arm64 tests.


qemu-system-aarch64 \
 -m 2048\
 -cpu max \
 -M virt \
 -nographic \
 -drive if=pflash,format=raw,file=efi.img,readonly=on \
 -drive if=pflash,format=raw,file=varstore.img \
 -drive if=none,file=noble-server-cloudimg-arm64.img,id=hd0 \
 -device virtio-blk-device,drive=hd0 \
 -netdev type=tap,id=net0 \
 -device virtio-net-device,netdev=net0

could not find net0, so tried

without network
---------------
qemu-system-aarch64 \
 -m 2048\
 -cpu max \
 -M virt \
 -nographic \
 -drive if=pflash,format=raw,file=efi.img,readonly=on \
 -drive if=pflash,format=raw,file=varstore.img \
 -drive if=none,file=noble-server-cloudimg-arm64.img,id=hd0 \
 -device virtio-blk-device,drive=hd0 

This went into a loop around 10 minutes in,
[FAILED] Failed to start systemd-resolved.service - Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
         Starting systemd-resolved.service - Network Name Resolution...
[FAILED] Failed to start systemd-resolved.service - Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
         Starting systemd-resolved.service - Network Name Resolution...
[FAILED] Failed to start systemd-resolved.service - Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
         Starting systemd-resolved.service - Network Name Resolution...
[    **] (1 of 2) Job apparmor.service/start running (13min 35s / no limit)

When running virt-manager,

"The emulator may not have search permissions for the path"

First run with sudo and then without?

sudo virt-manager
(say yes when it asks to fix the problem, go to next step, then cancel)

then
virt-manager

That worked.



But not available for arm64?

Login incorrect
ubuntu login: password[  361.700501] cloud-init[1126]: Cloud-init v. 24.4.1-0ubuntu0~24.04.3 running 'modules:final' at Fri, 09 May 2025 07:42:17 +0000. Up 360.36 seconds.

Password: ci-info: no authorized SSH keys fingerprints found for user ubuntu.

Probably must run
virt-sysprep

--password ubuntu:password:ubuntu
sets the password ubuntu for the user ubuntu.
virt-sysprep [--options] -a disk.img
virt-sysprep --password ubuntu:password:ubuntu -a ubuntu2404-arm64.img

sudo apt install libguestfs-tools

virt-customize --password ubuntu:password:ubuntu -a ubuntu2404-arm64.img

virt-customize -a ubuntu2404-arm64.img  --password ubuntu:password:ubuntu
Extra parameter on the command line: ‘ --password’.
Try ‘virt-customize --help’ or consult virt-customize(1) for more information

Needed to run as sudo.

sudo virt-customize -v -x -a ubuntu2404-arm64.img --root-password password:password

Boots up in around 5 minutes.


sudo qemu-img resize /home/sssvv/Downloads/QEMU/noble-server-cloudimg-arm64.img +20G
qemu-img: Command not found: resize /home/sssvv/Downloads/QEMU/noble-server-cloudimg-arm64.img +20G

maybe needs converting to raw?




Jenkins and Github

 I was curious to know how Jenkins CI/CD works with Github, similar to what is seen on the OpenSpace repository. So one way is to use webhooks, as detailed in this guide,

Complete Step-by-Step Jenkins CICD with GitHub Integration | by Mudasir | Medium

Tuesday, May 06, 2025

bash: cannot execute: required file not found

bash: cannot execute: required file not found

The problem, it turned out, was an incorrect path in the shebang.

#!/bin/bash
echo "Hello, World!"

will fail on a machine which does not have bash at /bin (or a link to bash there). I believe cron jobs also have problems if the shebang does not directly point to bash? Anyway, we can always do a 

which bash

to find the correct path and enter it in the shebang.

Sunday, May 04, 2025

virtualizing Raspberry Pi on an iPad with UTM

 We can virtualize a Raspberry Pi with UTM, but need old 32 bit version, since 64 bit is broken on UTM, tho' QEMU works - 

https://github.com/utmapp/UTM/issues/4827

script to run multiple commands on a remote server over ssh

 Made Chatgpt write the following script. The EOF syntax is useful. In our case, we need to put in the appropriate -pPORT also.

write a bash shell script to ssh into two servers server1 and server2 with ssh keys key1.pem and key2.pem, run sudo apt upgrade on both, and show the result on the terminal.

#!/bin/bash


# Define servers and keys

SERVER1="user1@server1"

KEY1="key1.pem"


SERVER2="user2@server2"

KEY2="key2.pem"


# Function to upgrade a server

upgrade_server() {

  local SERVER=$1

  local KEY=$2


  echo "Upgrading packages on $SERVER..."

  

  ssh -i "$KEY" -o StrictHostKeyChecking=no "$SERVER" << 'EOF'

    echo "Running apt update..."

    sudo apt update

    echo "Running apt upgrade..."

    sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y

EOF

}


# Upgrade both servers

upgrade_server "$SERVER1" "$KEY1"

echo "---------------------------------------------"

upgrade_server "$SERVER2" "$KEY2"


Saturday, May 03, 2025

x86 Emulation on iPad with UTM

Continuing my earlier post about UTM - finally got JIT to work on iPad. Apparently I had been successful earlier also, but had thought that the QEMU error was due to JIT not being enabled. Going into settings (in the context menu of each VM, accessed by long-press) and trying to increase RAM, UTM gave the warning that the system had only 1700 MB of RAM left, of which 1300 or so was free, hence increasing the VM's RAM beyond this would cause crashes. Ubuntu 14.04 boots up in around 4 minutes. Unfortunately, maybe due to Ubuntu's behaviour when running on a display without acceleration, very slow to respond. Nearly a minute for keystrokes to appear on screen!

What I followed was this:

Installed AltStore via AltServer for Windows - https://faq.altstore.io/altstore-classic/how-to-install-altstore-windows

Installed StikJIT & StosVPN via AltStore - StikJIT user manual

Copied over the pairing file created as per the user manual above, using iCloud Drive (Installed that also on the Windows machine.)

Then, the procedure is - 
  • Swipe up from down and hold, to show all applications - swipe up applications which you want to close and start again with JIT, like UTM.
  • Start StosVPN, click to start the connection
  • Start StikJIT - one-time requirement of passing on the path to the pairing file, then
  • Click Enable JIT - a few moments later, it prompts for which app to enable JIT for, from a list of apps - choose UTM, and then UTM opens up with JIT enabled. Can start up JMs at this point. 
But as mentioned in the first paragraph of this post, we need to choose those VM images (or create such VMs) which can work with 512 MB or 768 MB of RAM on this 9th gen iPad, since it has limited free RAM. Perhaps trying Raspberry Pi might be a good option.

Thursday, May 01, 2025

monitoring websites for changes - followthatpage

 There was a request from one of my colleagues for suggestions - he wanted a tool to automatically let him know when some particular websites had changes. Something similar to an RSS feed for a website which doesn't have an RSS feed, I guess. 

I replied that I use

https://www.followthatpage.com/

to monitor up to 20 pages for free per account per day - so if you don't want daily checks, you can add more pages, too.

There are many other "freemium" and paid options, too. 

Wednesday, April 30, 2025

development for Android / iOS - preliminaries

Seeing that the mobile devices were quite competitive with the desktop's processing power in a previous post, thought about working on porting various tools like OCVWarp to Android and iOS if feasible.

OpenCV Android - had earlier cloned / forked NDK samples.

The binaries are available here 
only up to OpenCV v3.4.3, but iOS framework seems to be available at
and

To check if swift playgrounds is available on 9th gen ipad - https://www.theverge.com/2021/6/15/22534902/ipad-pro-apple-swift-playgrounds-4-wwdc-2021

To check if example opencv apps can run on ipad.

Tuesday, April 29, 2025

info about various ARM platforms

 https://www.baeldung.com/linux/arm64-armel-armhf-overview

So, arm64 is sometimes referred to as aarch64. But the github arm64 appimage builds are not compatible with Ubuntu on raspberry pi 4 etc, maybe because of library differences, since the github runners are Ubuntu 24.04. 

Monday, April 28, 2025

simple logger created by chatgpt

I wanted to make a simple load-average logger. Thought of making ChatGPT do the typing, instead of me creating the simple code.

The result was quite OK.


The prompts and conversation are in the issues tab.

moving Virtualbox VMs to external drive

VirtualBox Manager
> Right-click on the VM
> Select "Move"
> Choose the new location and click "Move"

(Tho' the progress bar doesn't seem to work, it moved the VM and associated files to the external drive in approx the usual time it would take for a 12 GB file move.)

Sunday, April 27, 2025

OCVWarp AppImage won't run on Raspberry Pi

The OCVWarp AppImage compiled on github's ARM64 runner will not run on Raspberry Pi 4, error screenshot below.


But OCVWarp runs when compiled on the Pi itself.

In hindsight, 
This might be a problem with 
(a) /tmp not allowing executable permissions
(b) the ld-linux-aarch64.so not having executable permissions
)

Google's "free to try" AI Studio

Google AI Studio has image generation, video generation and more, in addition to text chat. But even Google's Gemini does not know this:) 

Unless we enable "auto-save" in the settings (I guess) our prompts are not saved in History.

Choosing the model Gemini2.0 Flash (image generation)
"Create an image of a sunset over a sandy beach" - result is below.


Not bad.

By clicking the Video generation tab, Veo 2 generated the following videos on the respective prompts. Not very good, but it's a good start. And the best part is that it's free. And it took less than a minute to generate.

"Create a video of overcast clouds over sunset on a sandy beach" - resulted in a timelapse-style video below:


"Generate a 360 degree equirectangular video of sunset over a beach" resulted in:

Since this was not really an equirectangular 360 degree video, tried by running the same prompt again. Then it gave:

 Refining my prompt, changed it to "Generate a VR360 equirectangular video of sunset over a beach" which resulted in this:

I didn't want any human beings or birds in the video, so I tried adding a negative prompt of birds, men, women - and the same prompt as above. But the result still had this woman,

All right. Maybe it will do better when given an image to work with. So, I uploaded the sunset image earlier generated with Gemini 2.0 Flash, and gave the prompt "Generate a VR360 equirectangular video from this image by panning left to right."
But it did not pan, instead added birds!

In summary, a long way to go. But since it's fast and free (the video generation did not specify any queries per day limits, but the Gemini models did specify 1500 requests per day and so on in the free tier), we can definitely try out some stuff. And perhaps upscale locally or with google colab. 







Geekbench scores - Android phone, iPad, laptop, desktop, Raspberry Pi

Thought of doing some benchmarks to rate the performance of the various devices to which I have access. Samsung Galaxy M34 Android phone, Raspberry Pi 4 8 GB without cooling fan, i5-4430 processor desktop with GTX 1050 graphics card, i5-1235U processor laptop with Intel graphics, 9th gen iPad.

https://www.geekbench.com/download/

Higher scores are better.

Example benchmarks also linked in the page above.

CPU single-core / multi-core - the Android phone was surprisingly close to the desktop. The iPad crashed this test, so I've not added it in the lineup below. The pi overheated without the cooling fan, hence it gave a worse multi-core performance than could be possible with better cooling.

Pi4 (292/519) < M34 (960/2072) < Desktop (1062/2813) < Laptop (2131/7460)

GPU OpenCL / Vulkan - the Pi4 gave an error, unknown CL platform, so it is not listed below. But the Pi5 seems to have a rating of only 96! And the iPad perhaps outperformed the Laptop.

M34 (2306/2339) < Laptop (11723/15237) < iPad (13914 (Metal)) < Desktop (22555/NA)

Conclusion - The Raspberry Pi 4 did much worse than I expected, and the mobile devices - the phone and the iPad - did better than I expected.