A modified wasmedge installer that doesn't need sudo and is made for me, a longtime user of oh-my-zsh on Linux, with enough customizations over the years to never want anyone ever, ever touching anything on my machine.
I should add that the people who originally wrote wasmedge, llamaedge, and all that amazing work, did not endorse this highly modified version of their beautiful install script. This is really for me on my own equipment, fully responsible for whatever this script does to my machines, and providing it as a public repo on Github so that others with similar development setups will have an example of how to modify install scripts that are starting to populate every tool or library, so that they don't require sudo privilege, and don't go making all sorts of changes to your system. If you run this script on your own machines, you do so fully understanding every single line of code in the script before running it, and you agree that you have no recourse toward me if you fuck up your own machine, claiming that this script was the cause of such a terrible day for you. This script does absolutely nothing that a few presses of the delete button won't fix.
Here's the quick and dirty:
The original wasmedge installation script is incredible. It's one of the more interesting shell scripts I've ever read.
However, I wanted to modify a few things for my own personal installation.
My reason for making these modifications is that I already have a BOSS oh-my-zsh configuration with CUDA libs, Nvidia GPU totally tricked out, massive time invested in configuring every imaginable development tool and library, and years of tightly-configured everything. I never, ever want somebody's generic installation script to make assumptions about what I have installed, what environment variables I may already have set, and I absolutely don't want to run such a script from out there in the wild with sudo privilege.
So, ... here is a summary of the modifications I've made to the amazing original script:
- download to a static dir: ~/Downloads/wasm (which I create before the script runs just because that is how I roll).
- save the downloaded files after finishing rather than deleting them.
- perform the install in ~/.wasmedge directory
- Don't modify .zshrc. Instead print all shell modifications to a new file: ~/.oh-my-zsh/custom/wasmedge.zsh (so I can easily keep up with them).
- Verbose priint every single step to stdout and also to a log file in ~/.wasmedge
- Completely remove the need to have sudo privilege to run the script.
So, look: I have no idea if this highly modified script will run on systems other than the machines I personally own. I don't know if it will work on Windoes or Macs, or even if it will run on any of the 6 Arch Linux boxes I have surrounding me. What I built this script for was to get it going on my Pop OS development box (this is NOT a recommendation for PoP OS. Those System76 guys fucked me over like you would not believe. They even never read the Gigabyte Motherboard manual, which clearly states not to insert an NVMe drive in the slot nearest the CPU if you happen to be running a GPU in the same-mapped PCie slot. Just by reading the manual and moving the drive, I generated an 8x speed-up of my GPU. Thanks for nothing System 76 assholes).
If you dare run this script, I insist that you feed it into a Chat AI model first, and ask it to explicitly tell you every single detail of what the script is doing to your machine (and your life) before you run it. The original came with an Apache License, and thus, I've attached an Apache License hereto. But really, don't run this script unless you are a heavily experienced Linux user who knows how to compile C++, Rust, work with conda/miniconda, compile Boost libs, etc., and values a tight, clean system that only you make edits to.