Skip to content

Commit bc9f7f8

Browse files
authored
Merge pull request #513 from Gregory-Pereira/rhelai-apiserver-install-use-s3-download
refactor build to download for api-server
2 parents a78e46c + d6a09f3 commit bc9f7f8

File tree

4 files changed

+11
-62
lines changed

4 files changed

+11
-62
lines changed

api-server/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,10 @@ We have provided some scripts that should facilitate installation of the API ser
6464
bash -c "$(curl -fsSL https://raw.githubusercontent.com/instructlab/ui/refs/heads/main/api-server/rhelai-install/install-glibc-devel.sh)"
6565
```
6666

67-
After the reboot has finished we can download the other two install scripts and run the `rhelai-install.sh` as the entrypoint. Make sure to return to your directory before you start:
67+
After the reboot has finished we can download and run the `rhelai-install.sh` script. Make sure to return to your directory before you start:
6868

6969
```bash
7070
cd ~/temp-apiserver-install
71-
curl -fsSL https://raw.githubusercontent.com/instructlab/ui/refs/heads/main/api-server/rhelai-install/install-go.sh
7271
bash -c "$(curl -fsSL https://raw.githubusercontent.com/instructlab/ui/refs/heads/main/api-server/rhelai-install/rhelai-install.sh)"
7372
```
7473

api-server/rhelai-install/install-glibc-devel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*-
2+
# -*- indent-tabs-mode: nil; tab-width: 4; sh-indentation: 4; -*-
33

44
# Dependency installations for RHELAI APIserver install
55

api-server/rhelai-install/install-go.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
11
#!/bin/bash
2-
# -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*-
2+
# -*- indent-tabs-mode: nil; tab-width: 4; sh-indentation: 4; -*-
33

44
# Install script for the API server
5-
## dependencies: go, git
65

76
set -x
87
set -e
98
set -o pipefail
109

11-
### installations
12-
13-
if [ -z "$(command -v git)" ]; then
14-
echo "please make sure \`git\` is installed."
15-
exit 1
16-
fi
17-
18-
if [ -z "$(command -v go)" ]; then
19-
echo "\`go\` is not installed, installing."
20-
./install-go.sh
21-
fi
22-
2310
if [ -z "$TAXONOMY_PATH" ]; then
2411
echo "Var \$TAXONOMY_PATH was not set, using default path: $HOME/.local/share/instructlab/taxonomy."
2512
export TAXONOMY_PATH="$HOME/.local/share/instructlab/taxonomy"
@@ -30,21 +17,21 @@ if [ ! -d "$TAXONOMY_PATH" ]; then
3017
exit 1
3118
fi
3219

33-
### script
34-
35-
if [ -d "/tmp/ui" ]; then
36-
rm -rf /tmp/ui
20+
if [ -d "/tmp/api-server" ]; then
21+
rm -rf /tmp/api-server
3722
fi
3823

39-
git clone https://github.com/instructlab/ui.git /tmp/ui
24+
mkdir -p /tmp/api-server
4025
cd /tmp/ui/api-server
41-
go mod download
42-
go build -o ilab-api-router
26+
wget https://instructlab-ui.s3.us-east-1.amazonaws.com/apiserver/apiserver-linux-amd64.tar.gz
27+
tar -xzf apiserver-linux-amd64.tar.gz
28+
mv apiserver-linux-amd64/ilab-apiserver /usr/local/sbin
29+
rm -rf apiserver-linux-amd64 apiserver-linux-amd64.tar.gz
4330

4431
CUDA_FLAG=""
4532

4633
if [ "$(command -v nvcc)" ] && [ -n "$(nvcc --version)" ]; then
4734
CUDA_FLAG="--cuda"
4835
fi
4936

50-
./ilab-api-router --taxonomy-path "$TAXONOMY_PATH" $CUDA_FLAG --rhelai --vllm
37+
ilab-apiserver --taxonomy-path "$TAXONOMY_PATH" $CUDA_FLAG --rhelai --vllm

0 commit comments

Comments
 (0)