jopemachine / backend.ai-hook

Hooking library-level functions for Backend.AI kernel containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backend.AI Hook

A user-level hooker to override library functions inside Backend.AI's kernel containers

Features

  • Override sysconf() to expose the number of actually schedulable CPU cores based on sysfs cgroup CPU set information.
  • Override scanf() to get the user keyboard input via the local Backend.AI Agent.

How to build

For musl-compatible build using Alpine Linux, run:

./build.sh alpine

For glibc-compatible build using Debian Linux, run:

./build.sh ubuntu

How to run tests

./test.sh alpine
./test.sh ubuntu

About

Hooking library-level functions for Backend.AI kernel containers

License:GNU Lesser General Public License v3.0


Languages

Language:C++ 55.2%Language:Shell 17.6%Language:Python 14.1%Language:CMake 7.8%Language:Dockerfile 4.4%Language:C 0.8%