Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ilab wrapper script adjustments #680

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

omertuc
Copy link
Contributor

@omertuc omertuc commented Jul 17, 2024

ilab wrapper script adjustments

Ticket RHELAI-442

Background

RHEL AI ships with a script in /usr/local/bin called ilab which makes running ilab commands feel native even though they're actually running in a podman container

Issues

  • The script is outdated / used several different container images for different purposes, while it should be just using the single instructlab image

  • The volume mounts were incorrect, as instructlab now uses XDG paths

  • Unnecessary directory creation for HF_CACHE

  • Unnecessary GPU count logic

  • Script has unnecessary fiddling of ilab parameters, essentially creating a UX that deviates from the natural ilab CLI

Solutions

  • Changed script to use the single container image IMAGE_NAME (this was already the case mostly, except for old references to LVLM_NAME and TRAIN_NAME which no longer get replaced leading to a broken PODMAN_COMMAND_SERVE. Also adjusted entrypoint to use the ilab executable in the pyenv

  • Will now mount the host's ~/.config and ~/.local into the container's corresponding directories, for instructlab to use and for its config / data to persist across invocations

  • Will now mount ~/.cache into the container's corresponding .cache directory, so that the information stored in the default HF_CACHE is also persisted across invocations

  • Removed unnecessary GPU count logic

  • Removed all parameter parsing / fiddling

Other changes

Added secret/fake "shell" ilab subcommand which opens a shell in the wrapper's container, useful for troubleshooting issues with the wrapper itself

@omertuc omertuc force-pushed the wrapper branch 4 times, most recently from 7443a07 to fe80cd3 Compare July 17, 2024 13:57
@omertuc omertuc changed the title WIP ilab wrapper script adjustments ilab wrapper script adjustments Jul 17, 2024
@omertuc omertuc marked this pull request as ready for review July 17, 2024 13:58
@omertuc omertuc force-pushed the wrapper branch 5 times, most recently from 4ba8832 to 65fe141 Compare July 17, 2024 14:54
@n1hility
Copy link
Member

Excellent thank you @omertuc LGTM

@n1hility
Copy link
Member

Just need DCO

Ticket [RHELAI-442](https://issues.redhat.com/browse/RHELAI-442)

# Background

RHEL AI ships with a script in `/usr/local/bin` called `ilab` which
makes running `ilab` commands feel native even though they're actually
running in a podman container

# Issues

* The script is outdated / used several different container images for
different purposes, while it should be just using the single instructlab
image

* The volume mounts were incorrect, as instructlab now uses XDG paths

* Unnecessary directory creation for `HF_CACHE`

* Unnecessary GPU count logic

* Script has unnecessary fiddling of `ilab` parameters, essentially creating a
  UX that deviates from the natural `ilab` CLI

# Solutions

* Changed script to use the single container image `IMAGE_NAME` (this
  was already the case mostly, except for old references to `LVLM_NAME`
  and `TRAIN_NAME` which no longer get replaced leading to a broken `PODMAN_COMMAND_SERVE`.
  Also adjusted entrypoint to use the `ilab` executable in the pyenv

* Will now mount the host's `~/.config` and `~/.local` into the
  container's corresponding directories, for `instructlab` to use
  and for its config / data to persist across invocations

* Will now mount `~/.cache` into the container's corresponding `.cache`
  directory, so that the information stored in the default `HF_CACHE` is
  also persisted across invocations

* Removed unnecessary GPU count logic

* Removed all parameter parsing / fiddling

# Other changes

Added secret/fake "shell" `ilab` subcommand which opens a shell in the
wrapper's container, useful for troubleshooting issues with the wrapper
itself

Signed-off-by: Omer Tuchfeld <[email protected]>
Copy link
Collaborator

@Gregory-Pereira Gregory-Pereira left a comment

Choose a reason for hiding this comment

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

/lgtm

@lmilbaum lmilbaum merged commit 48eabdd into containers:main Jul 18, 2024
1 check passed
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.

4 participants