upgrade dockerfile
Some checks failed
Build, Push and Redeploy Docker Image / build-and-push (push) Failing after 3m45s

This commit is contained in:
2026-02-03 20:40:21 +07:00
parent 8782400d7e
commit 5a779f44a9
3 changed files with 52 additions and 44 deletions

View File

@@ -1,34 +1,18 @@
#!/bin/bash
message_print() {
echo
echo "#########################################"
echo $1
echo "#########################################"
echo
}
set -e # Автоматический выход при ошибке
cd /
echo
echo "#########################################"
echo "Starting RKLLM Gradio Server"
echo "#########################################"
echo
message_print "Changing to repository..."
git clone https://git.home/drholy/ezrknn-llm
cd ezrknn-llm/
cp ./rkllm-runtime/runtime/Linux/librkllm_api/aarch64/* /usr/lib
cp ./rkllm-runtime/runtime/Linux/librkllm_api/include/* /usr/local/include
# Проверка наличия моделей (монтируются через volume)
if [ ! -d "/app/models" ] || [ -z "$(ls -A /app/models 2>/dev/null)" ]; then
echo "⚠️ WARNING: Models directory is empty!"
echo " Mount models volume: -v ./models:/app/models"
sleep 5
fi
message_print "Compiling LLM runtime for Linux..."
cd ./rkllm-runtime/examples/rkllm_api_demo/
bash build-linux.sh
message_print "Moving rkllm to /usr/bin..."
cp ./build/build_linux_aarch64_Release/llm_demo /usr/bin/rkllm
echo "* soft nofile 16384" >> /etc/security/limits.conf
echo "* hard nofile 1048576" >> /etc/security/limits.conf
message_print "Increasing file limit for all users (needed for LLMs to run)..."
echo "root soft nofile 16384" >> /etc/security/limits.conf
echo "root hard nofile 1048576" >> /etc/security/limits.conf
message_print "Done installing ezrknn-llm!"
message_print "Start Gradio server"
cd /app
python rkllm_server_gradio.py
# Запуск сервера
exec python rkllm_server_gradio.py