File tree Expand file tree Collapse file tree 2 files changed +73
-0
lines changed
Expand file tree Collapse file tree 2 files changed +73
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ go run main.go --taxonomy-path ~/.local/share/instructlab/taxonomy/ --rhelai --c
4444The ` --rhelai ` flag indicates that the ilab binary is available in the system's $PATH and does not require a virtual environment.
4545When using ` --rhelai ` , the ` --base-dir ` flag is not required since it will be in a known location at least for meow.
4646
47+ There is also a script that has been provided to make installing on RHEL AI simpler. To do this, simply use the following one liner:
48+
49+ ``` bash
50+ sh -c " $( curl -fsSL https://github.com/instructlab/ui/blob/main/api-server/rhelai-install.sh) "
51+ ```
52+
4753### Example command with paths
4854
4955Here's an example command for running the server on a macOS machine with Metal support:
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*-
3+
4+ # Install script for the API server
5+ # # dependencies: go, git
6+ # # required ENV vars: TAXONOMY_PATH, BASE_DIR
7+
8+ set -x
9+ set -e
10+ set -o pipefail
11+
12+ # ## installations
13+
14+ rpm-ostree install gcc glibc-devel
15+ systemctl reboot
16+ export CGO_ENABLED=1
17+
18+ # ## Validations
19+
20+ if [ -z $( command -v git) ]; then
21+ echo " please make sure \` git\` is installed."
22+ exit 1
23+ fi
24+
25+ if [ -z $( command -v go) ]; then
26+ echo " please make sure \` go\` is installed."
27+ exit 1
28+ fi
29+
30+ if [ -z " $TAXONOMY_PATH " ]; then
31+ echo " please set the taxonomy-path as env variable \$ TAXONOMY_PATH"
32+ exit 1
33+ else
34+ if [ ! -d " $TAXONOMY_PATH " ]; then
35+ echo " \$ TAXONOMY_PATH was set as $TAXONOMY_PATH , but path does not exist."
36+ exit 1
37+ fi
38+ fi
39+
40+ if [ -z " $BASE_DIR " ]; then
41+ echo " please set the base-dir as env variable \$ BASE_DIR"
42+ exit 1
43+ else
44+ if [ ! -d " $BASE_DIR " ]; then
45+ echo " \$ BASE_DIR was set as $BASE_DIR , but path does not exist."
46+ exit 1
47+ fi
48+ fi
49+
50+ # ## script
51+
52+ if [ -d " /tmp/ui" ]; then
53+ rm -rf /tmp/ui
54+ fi
55+
56+ git clone https://github.com/instructlab/ui.git /tmp
57+ cd /tmp/ui/api-server
58+ go mod download
59+
60+ CUDA_FLAG=" "
61+
62+ if [ $( command -v nvcc) ] && [ -n $( nvcc --version) ]; then
63+ CUDA_FLAG=" --cuda"
64+ fi
65+
66+ # go run main.go --taxonomy-path ~/.local/share/instructlab/taxonomy/ --rhelai
67+ go run main.go --taxonomy-path $TAXONOMY_PATH --rhelai $CUDA_FLAG
You can’t perform that action at this time.
0 commit comments