containers / ai-lab-recipes

Examples for building and running LLM services and applications locally with Podman
Apache License 2.0
111 stars 110 forks source link

ilab-wrapper: Improve non-single subuid ranges error handling #730

Closed omertuc closed 3 months ago

omertuc commented 3 months ago

Background

df8885777d2257a6271ca1a6461673d1d96e99d6

Issue

The current error handling for multiple subuid ranges is broken due to surprising behavior of wc -l which always returns 1 even when the input is empty.

Solution

More carefully count the number of lines in the CURRENT_USER_SUBUID_RANGE variable

Additional changes

https://github.com/omertuc/ai-lab-recipes/commit/50fb00f26f921bc5e420bed4e43d275a600e9b4c had a small merge error, this commit fixes that.

eranco74 commented 3 months ago

/lgtm /approve

rhatdan commented 3 months ago

Needs a rebase or to be closed, it the code was already merged.

omertuc commented 3 months ago

Force pushed to fix conflicts

rhatdan commented 3 months ago

LGTM