|
| 1 | +--- |
| 2 | +sidebar_position: 7 |
| 3 | +--- |
| 4 | + |
| 5 | +# Installer V2 Guide |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +WasmEdge installer V2 is designed for installing the Core Tools (`wasmedge`, `wasmedge compile`), the Libraries (`libwasmedge`), and the WASI-NN GGML/GGUF Plugin.. |
| 10 | + |
| 11 | +## Dependencies |
| 12 | + |
| 13 | +This is a pure shell script implementation. The only dependecies are `curl` or `wget` for downloading the tarballs, and `tar` for extracting them. |
| 14 | + |
| 15 | + |
| 16 | +## Usage |
| 17 | + |
| 18 | +```bash |
| 19 | +curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- ${OPTIONS} |
| 20 | +``` |
| 21 | + |
| 22 | +## Roles |
| 23 | + |
| 24 | +### `install_v2.sh` |
| 25 | + |
| 26 | +The installer entry point. |
| 27 | + |
| 28 | +## Options |
| 29 | + |
| 30 | +### Help Msg |
| 31 | + |
| 32 | +- Short Option: `-h` |
| 33 | +- Full Option: `--help` |
| 34 | +- Description: Show the help message and exit. |
| 35 | + |
| 36 | +### Verbose |
| 37 | + |
| 38 | +- Short Option: `-V` |
| 39 | +- Full Option: `--verbose` |
| 40 | +- Description: Enable verbosity debug |
| 41 | + |
| 42 | +### Specify the version of WasmEdge to install |
| 43 | + |
| 44 | +- Short Option: `-v VERSION` |
| 45 | +- Full Option: `--version=VERSION` |
| 46 | +- Description: Install the given VERSION of WasmEdge |
| 47 | +- Available Value: VERSION `{{ wasmedge_version }}` or other valid release versions. |
| 48 | +- Note - If supplied an invalid or nonexistent version, the installer exits with an error. |
| 49 | + |
| 50 | +### Installation path |
| 51 | + |
| 52 | +- Short Option: `-p PATH` |
| 53 | +- Full Option: `--path=PATH` |
| 54 | +- Description: Install WasmEdge into the given PATH. The default Path is `$HOME/.wasmedge`. |
| 55 | +- Note - Any paths other than the ones starting with `/usr` are treated as non-system paths in the internals of the installer. The consequences are different directory structures for both. |
| 56 | + |
| 57 | +### Temporary directory |
| 58 | + |
| 59 | +- Short Option: `-t PATH` |
| 60 | +- Full Option: `--tmpdir=PATH` |
| 61 | +- Description: Download the tarballs into the given PATH. The default Path is `/tmp`. |
| 62 | +- Note - If the `/tmp` directory is not writable, the installer exits with an error. Please use this option to change the temporary directory. |
| 63 | + |
| 64 | +### GGML/GGUF related options |
| 65 | + |
| 66 | +#### Install CUDA version of the GGUF plugin |
| 67 | + |
| 68 | +- Short Option: `-c cuda_version` |
| 69 | +- Full Option: `--ggmlcuda=cuda_version[11/12]` |
| 70 | +- Description: Install the specified CUDA version of the GGUF plugin. E.g. `11` for cuda-11, `12` for cuda-12. |
| 71 | +- Note - The installer will try to detect the CUDA version if not specified. However, if the detection failed, you can specify the version using this option. |
| 72 | + |
| 73 | +#### Specify the plugin version to install |
| 74 | + |
| 75 | +- Short Option: `-b ggmlversion` |
| 76 | +- Full Option: `--ggmlbn=ggmlversion` |
| 77 | +- Description: Install the specified GGUF plugin. E.g. `b2963`. |
| 78 | +- Note - Please use this option when you really know what you are doing. |
| 79 | + |
| 80 | +### Platform and OS |
| 81 | + |
| 82 | +- Short Option: `-o OS` |
| 83 | +- Full Option: `--os=OS` |
| 84 | +- Description: Install the given `OS` version of WasmEdge. This value should be case insensitive to make the maximum compatibility. |
| 85 | +- Available Value (case insensitive): "Linux", "Darwin". |
| 86 | + |
| 87 | +### Machine and Arch |
| 88 | + |
| 89 | +- Short Option: `-a ARCH` |
| 90 | +- Full Option: `--arch=ARCH` |
| 91 | +- Description: Install the `ARCH` version of WasmEdge. |
| 92 | +- Available Value: "x86\_64", "aarch64", "arm64". |
| 93 | + |
| 94 | +## Behavior |
| 95 | + |
| 96 | +- WasmEdge installation appends all the files it installs to a file which is located in the installer directory named `env` with its path as `$INSTALLATION_PATH/env`. |
| 97 | + |
| 98 | +### Shell and it's configuration |
| 99 | + |
| 100 | +- Source string in shell configuration is given as `. $INSTALLATION_PATH/env` so that it exports the necessary environment variables for WasmEdge. |
| 101 | +- Shell configuration file is appended with source string if it cannot find the source string in that file. |
| 102 | +- Currently, it detects only `Bash` and `zsh` shells. |
| 103 | +- If the above shells are found, then their respective configuration files `$HOME/.bashrc` and `$HOME/.zshrc` are updated along with `$HOME/.zprofile` and `$HOME/.bash_profile` in the case of Linux. |
| 104 | +- In the case of `Darwin`, only `$HOME/.zprofile` is updated with the source string. |
0 commit comments