Auto-detect the base-distro (aka glibc version) of container images #1684
Labels
comp:agent
Related to Agent component
effort:hard
Need to understand many components / a large extent of contextual or historical information.
urgency:2
With time limit, it should be finished within it; otherwise, resolve it when no other chores.
Milestone
Currently we rely on
ai.backend.base-distro
label to choose the appropriate build of statically built in-container applications injected by the agent, such as sftp-server, libbaihook, etc.Sometimes, there are human errors to misconfigure this lable or omit it, causing unexpected app launch failures after creating session containers.
Could we read the container image (without lauching it?) to determine the glibc version inside it to automate this process so that the agent could mount the appropriate binaries before starting the container?
Requirements:
TODOs:
overlay
concrete class for the interface.Expected results:
Some surveys
Inspecting the filesystem of container image without running it
Docker by default uses the overlay2 storage driver. (docs, source)
We can manually create a temporary directroy and mount the overlay driver using the list of layer diffs stored as "LowerDir" in the result of
docker image inspect
:For most cases, we could consider only the overlay driver and fallback to temporarily creating a container for inspection.
Retrieving the glibc version from
libc.so.N
fileRead the symbol versions and take the latest one.
Some examples of our binary's glibc version requirements
The text was updated successfully, but these errors were encountered: