Skip to content

Conversation

@vishnoianil
Copy link
Member

No description provided.

@vishnoianil vishnoianil force-pushed the one-touch-installation branch 4 times, most recently from dbecf3a to 0de090f Compare February 2, 2025 09:25
@vishnoianil
Copy link
Member Author

vishnoianil commented Feb 2, 2025

@nerdalert @Gregory-Pereira @cooktheryan

$ ./ilab-ui-native-installer.sh --help
Usage: ./ilab-ui-native-installer.sh COMMAND [OPTIONS]...

Installer to install the InstructLab UI in the Native Mode on Podman.

Commands:
  install         Configures and install the InstructLab UI stack.
  uninstall       Uninstalls the InstructLab UI stack and removes temporary files.

Options:
  --help          Show this message and exit.
$ ./ilab-ui-native-installer.sh install --help
Usage: ./ilab-ui-native-installer.sh install [OPTIONS]...

Installs the InstructLab UI stack in Native mode on Podman.
This command installs one binary on the host and few containers on Podman.

Options:
  --username TEXT              (Required) Set username for authentication.
  --password TEXT              (Required) Set password for authentication.
  --taxonomy-dir PATH          (Optional) Path of the taxonomy repo directory.
                                                          e.g /var/home/cloud-user/.local/share/instructlab/taxonomy.
  --auth-url URL               (Optional) Authentication URL. (default: https://localhost:3000).
  --auth-secret TEXT           (Optional) Authentication secret.
  --dev-mode                   (Optional)Enable development mode. Deploys assistive features for Developers.
  --experimental-features      (Optional)Enable experimental features available in Native mode.
  --python-venv-dir            (Optional)Path to the InstructLab Python virtual environment directory .
                                                         e.g /var/home/cloud-user/instructlab/venv .
$ ./ilab-ui-native-installer.sh uninstall --help
Usage: ./ilab-ui-native-installer.sh uninstall [OPTIONS]...

Uninstalls the InstructLab UI stack and removes temporary files downloaded during installation.

Options:
  --help          Show this message and exit.

Example install:

✗ ./ilab-ui-native-installer.sh install --username admin --password pass
Cheking if ilab (InstructLab CLI) is installed natively...

ilab (InstructLab) is not installed natively on the host!.

Discovering python virtual environment present on the host...

Following python virtual environments found on the host.

Select a python virtual environment that is running InstructLab:
0. Don't want to use InstructLab set up in python virtual environment
1. /Users/avishnoi/Library/Caches/pypoetry/virtualenvs/docling-serve-j9OkRqRA-py3.11
2. /Users/avishnoi/Library/Caches/pypoetry/virtualenvs/docling-QeyHDDyJ-py3.11
3. /Users/avishnoi/github-workspace/instructlab/venv
Enter your choice (0-3): 3

NOTE: To skip the virtual environment discovery, you can use --python-venv-dir option to provide the python virtual environment path.

Discovering ilab configured taxonomy on the host...

NOTE: To skip taxonomy path discovery, you can provide the taxonomy directory path using --taxonomy-dir option 

Starting InstructLab UI installation...

InstructLab UI will be set up with taxonomy present in  /Users/avishnoi/.local/share/instructlab/taxonomy.

Downloading the secret.yaml sample file...

Configuring the secrets for UI stack installation...

Downloading the api server binary for OS: darwin and ARCH: arm64 

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6074k  100 6074k    0     0  5191k      0  0:00:01  0:00:01 --:--:-- 5192k
x ilab-apiserver
x README.md
API server binary is downloaded and configured.

Starting API server on OS: darwin running on arch arm64 

API server service is started in background. Logs are available in ilab-apiserver.log file.

Downloading the UI stack manifest file (instructlab-ui.yaml)...

UI stack manifest file (instructlab-ui.yaml) is configured with required parameters

Deploying the secrets in Podman...

Secrets:
6a2c0ec71354d19201263d2c6

Deploying the UI stack containers in Podman...

Pod:
1097610ec0bd6bcfea0024c470084868ae7e7d6dbee90979c86f0f6d8e2f5e30
Container:
091b2d213f66154ee2c638d7004e988d662934f0bbc283bb2515bf9af697357c

Pod:
65330513dcefc38f5b544aaf867e2bb8aebf8fa8386b55ac2745ed9ef45f0cf4
Container:
b1d14ca6b59771b03022ee05944429f666d505998b812eb313d892b2ebe299a4

Pod:
51be6520e42e93640074e9ba92977f3fa421b4e4413d8a07e8e7483125312bae
Container:
f6cd5c27144aa102c75ebb3a2d6f42f8de4ab2b068ebdb30c4fc7dd3c3eba729

Containers deployed for UI stack...

CONTAINER ID  IMAGE                                    COMMAND               CREATED                 STATUS                 PORTS                             NAMES
5bdcd1eb3f91  localhost/podman-pause:5.3.2-1737504000                        5 seconds ago           Up 4 seconds           0.0.0.0:4000->4000/tcp            1097610ec0bd-infra
091b2d213f66  ghcr.io/instructlab/ui/pathservice:main  /pathservice          3 seconds ago           Up 4 seconds           0.0.0.0:4000->4000/tcp            pathservice-pod-pathservice
f4a6bb2380b2  localhost/podman-pause:5.3.2-1737504000                        3 seconds ago           Up 2 seconds           0.0.0.0:5001->5001/tcp            65330513dcef-infra
b1d14ca6b597  ghcr.io/ds4sd/docling-serve-cpu:main     uvicorn --port 50...  2 seconds ago           Up 2 seconds           0.0.0.0:5001->5001/tcp, 8080/tcp  doclingserve-pod-doclingserve
2b37b0f86679  localhost/podman-pause:5.3.2-1737504000                        1 second ago            Up Less than a second  0.0.0.0:3000->3000/tcp            51be6520e42e-infra
f6cd5c27144a  ghcr.io/instructlab/ui/ui:main           npm run start         Less than a second ago  Up Less than a second  0.0.0.0:3000->3000/tcp, 8080/tcp  ui-pod-ui

InstructLab UI is successfully installed. You can access the UI at the following http://localhost:3000

Example uninstall:

➜  podman git:(one-touch-installation) ✗ ./ilab-ui-native-installer.sh uninstall
Are you sure you want to uninstall the InstructLab UI stack? (yes/no): yes
Uninstalling InstructLab UI stack...

Deleting the UI stack containers from Podman...

Pods stopped:
1097610ec0bd6bcfea0024c470084868ae7e7d6dbee90979c86f0f6d8e2f5e30
65330513dcefc38f5b544aaf867e2bb8aebf8fa8386b55ac2745ed9ef45f0cf4
51be6520e42e93640074e9ba92977f3fa421b4e4413d8a07e8e7483125312bae
Pods removed:
1097610ec0bd6bcfea0024c470084868ae7e7d6dbee90979c86f0f6d8e2f5e30
65330513dcefc38f5b544aaf867e2bb8aebf8fa8386b55ac2745ed9ef45f0cf4
51be6520e42e93640074e9ba92977f3fa421b4e4413d8a07e8e7483125312bae
Secrets removed:
Volumes removed:
Deleting the UI stack secrets from Podman...

Pods stopped:
Pods removed:
Secrets removed:
6a2c0ec71354d19201263d2c6
Volumes removed:
Stopping API server (if installed)...

Cleaning up all the downloaded and temporary files

Uninstallation successfully completed.

@vishnoianil vishnoianil force-pushed the one-touch-installation branch from 0de090f to 6538ad4 Compare February 2, 2025 09:32
} else {
// Use ilab from virtual environment
srv.ilabCmd = filepath.Join(srv.baseDir, "venv", "bin", "ilab")
srv.ilabCmd = filepath.Join(srv.baseDir, "bin", "ilab")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this break the api server running in the default namespace if ilab isn’t copied into PATH? Add a flag if so plx sir.

Copy link
Member Author

@vishnoianil vishnoianil Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nerdalert venv is the name of virtual environment, user is to free to choose any name when they create the virtual environment. This installer now pass the entire path <venv-path>/<venv-name> to the apiserver. In this case it would be <venv-path>/venv. does that break anything in the apiserver?

Copy link
Member

@nerdalert nerdalert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vishnoianil vishnoianil force-pushed the one-touch-installation branch 2 times, most recently from 3de082d to 2b639dc Compare February 3, 2025 05:59
Also fixes:
Updated Makefile and api-server github job to build
binaries with CGO_ENABLED=1

Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
@vishnoianil vishnoianil force-pushed the one-touch-installation branch from 2b639dc to a99521b Compare February 3, 2025 06:20
@vishnoianil vishnoianil merged commit ff9ee6d into instructlab:main Feb 3, 2025
11 checks passed
@vishnoianil vishnoianil deleted the one-touch-installation branch February 3, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants