New package secubox-app-streamlit-launcher: - Lazy loading: apps start only when accessed - Idle shutdown: stop apps after configurable timeout (default 30min) - Memory management: force-stop low-priority apps when memory low - Priority system: higher priority = keep running longer - Always-on mode for critical apps - Procd daemon with respawn CLI: streamlit-launcherctl - daemon: run background manager - status/list: show app states and idle times - start/stop: manual app control - priority: set app priority (1-100) - check/check-memory: manual checks Updated slforge with launcher integration: - slforge launcher status/priority/always-on commands - Access tracking on app start - README documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.3 KiB
Makefile
49 lines
1.3 KiB
Makefile
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=secubox-app-streamlit-launcher
|
|
PKG_VERSION:=1.0.0
|
|
PKG_RELEASE:=1
|
|
PKG_MAINTAINER:=SecuBox Team
|
|
PKG_LICENSE:=MIT
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/secubox-app-streamlit-launcher
|
|
SECTION:=secubox
|
|
CATEGORY:=SecuBox
|
|
TITLE:=Streamlit On-Demand Launcher
|
|
DEPENDS:=+secubox-app-streamlit-forge
|
|
PKGARCH:=all
|
|
endef
|
|
|
|
define Package/secubox-app-streamlit-launcher/description
|
|
On-demand Streamlit app launcher with idle shutdown.
|
|
Starts apps only when accessed, stops after idle timeout.
|
|
Monitors memory and can force-stop low-priority apps.
|
|
endef
|
|
|
|
define Build/Compile
|
|
endef
|
|
|
|
define Package/secubox-app-streamlit-launcher/install
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) ./files/etc/config/streamlit-launcher $(1)/etc/config/
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./files/etc/init.d/streamlit-launcher $(1)/etc/init.d/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
|
$(INSTALL_BIN) ./files/usr/sbin/streamlit-launcherctl $(1)/usr/sbin/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/share/streamlit-launcher
|
|
$(INSTALL_DATA) ./files/usr/share/streamlit-launcher/loading.html $(1)/usr/share/streamlit-launcher/
|
|
endef
|
|
|
|
define Package/secubox-app-streamlit-launcher/postinst
|
|
#!/bin/sh
|
|
[ -n "$${IPKG_INSTROOT}" ] || /etc/init.d/streamlit-launcher enable
|
|
exit 0
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,secubox-app-streamlit-launcher))
|