From 4d594255f136d46a44d20ed395b853738710d9d9 Mon Sep 17 00:00:00 2001 From: "Nat Kershaw (MSFT)" Date: Thu, 9 Jan 2025 16:08:08 -0800 Subject: [PATCH] Update build genai from source (#23312) --- docs/genai/howto/build-from-source.md | 47 +-------------------------- 1 file changed, 1 insertion(+), 46 deletions(-) diff --git a/docs/genai/howto/build-from-source.md b/docs/genai/howto/build-from-source.md index 1fbcab494e3fa..b1a39c3baff30 100644 --- a/docs/genai/howto/build-from-source.md +++ b/docs/genai/howto/build-from-source.md @@ -25,51 +25,9 @@ git clone https://github.com/microsoft/onnxruntime-genai cd onnxruntime-genai ``` -## Download ONNX Runtime binaries - -By default, the onnxruntime-genai build expects to find the ONNX Runtime include and binaries in a folder called `ort` in the root directory of onnxruntime-genai. You can put the ONNX Runtime files in a different location and specify this location to the onnxruntime-genai build via the `--ort_home` command line argument. - - -These instructions assume you are in the `onnxruntime-genai` folder. - -#### Windows - -These instruction use `win-x64`. Replace this if you are using a different architecture. - -```bash -curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.19.2/onnxruntime-win-x64-1.19.2.zip -o onnxruntime-win-x64-1.19.2.zip -tar xvf onnxruntime-win-x64-1.19.2.zip -move onnxruntime-win-x64-1.19.2 ort -``` - -#### Linux and Mac - -These instruction use `linux-x64-gpu`. Replace this if you are using a different architecture. - -```bash -curl -L https://github.com/microsoft/onnxruntime/releases/download/v1.19.2/onnxruntime-linux-x64-gpu-1.19.2.tgz -o onnxruntime-linux-x64-gpu-1.19.2.tgz -tar xvzf onnxruntime-linux-x64-gpu-1.19.2.tgz -mv onnxruntime-linux-x64-gpu-1.19.2 ort -``` - -#### Android - -If you do not already have an `ort` folder, create one. - -```bash -mkdir ort -``` - -```bash -curl -L https://repo1.maven.org/maven2/com/microsoft/onnxruntime/onnxruntime-android/1.19.2/onnxruntime-android-1.19.2.aar -o ort/onnxruntime-android-1.19.2.aar -cd ort -tar xvf onnxruntime-android-1.19.2.aar -cd .. -``` - ## Build the generate() API -This step assumes that you are in the root of the onnxruntime-genai repo, and you have followed the previous steps to copy the onnxruntime headers and binaries into the folder specified by , which defaults to `onnxruntime-genai/ort`. +This step assumes that you are in the root of the onnxruntime-genai repo. All of the build commands below have a `--config` argument, which takes the following options: - `Release` builds release binaries @@ -159,6 +117,3 @@ Use the header in `src\ort_genai.h` and the libraries in `build\Windows\Release` #### Linux Use the header in `src/ort_genai.h` and the libraries in `build/Linux/Release` - - -