Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions api-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ We have provided some scripts that should facilitate installation of the API ser
bash -c "$(curl -fsSL https://raw.githubusercontent.com/instructlab/ui/refs/heads/main/api-server/rhelai-install/install-glibc-devel.sh)"
```

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:
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:

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

Expand Down
2 changes: 1 addition & 1 deletion api-server/rhelai-install/install-glibc-devel.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*-
# -*- indent-tabs-mode: nil; tab-width: 4; sh-indentation: 4; -*-

# Dependency installations for RHELAI APIserver install

Expand Down
37 changes: 0 additions & 37 deletions api-server/rhelai-install/install-go.sh

This file was deleted.

31 changes: 9 additions & 22 deletions api-server/rhelai-install/rhelai-install.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@
#!/bin/bash
# -*- indent-tabs-mode: nil; tab-width: 2; sh-indentation: 2; -*-
# -*- indent-tabs-mode: nil; tab-width: 4; sh-indentation: 4; -*-

# Install script for the API server
## dependencies: go, git

set -x
set -e
set -o pipefail

### installations

if [ -z "$(command -v git)" ]; then
echo "please make sure \`git\` is installed."
exit 1
fi

if [ -z "$(command -v go)" ]; then
echo "\`go\` is not installed, installing."
./install-go.sh
fi

if [ -z "$TAXONOMY_PATH" ]; then
echo "Var \$TAXONOMY_PATH was not set, using default path: $HOME/.local/share/instructlab/taxonomy."
export TAXONOMY_PATH="$HOME/.local/share/instructlab/taxonomy"
Expand All @@ -30,21 +17,21 @@ if [ ! -d "$TAXONOMY_PATH" ]; then
exit 1
fi

### script

if [ -d "/tmp/ui" ]; then
rm -rf /tmp/ui
if [ -d "/tmp/api-server" ]; then
rm -rf /tmp/api-server
fi

git clone https://github.com/instructlab/ui.git /tmp/ui
mkdir -p /tmp/api-server
cd /tmp/ui/api-server
go mod download
go build -o ilab-api-router
wget https://instructlab-ui.s3.us-east-1.amazonaws.com/apiserver/apiserver-linux-amd64.tar.gz
tar -xzf apiserver-linux-amd64.tar.gz
mv apiserver-linux-amd64/ilab-apiserver /usr/local/sbin
rm -rf apiserver-linux-amd64 apiserver-linux-amd64.tar.gz

CUDA_FLAG=""

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

./ilab-api-router --taxonomy-path "$TAXONOMY_PATH" $CUDA_FLAG --rhelai --vllm
ilab-apiserver --taxonomy-path "$TAXONOMY_PATH" $CUDA_FLAG --rhelai --vllm
Loading