turn to work version
This commit is contained in:
@@ -10,7 +10,7 @@ message_print() {
|
||||
cd /
|
||||
|
||||
message_print "Changing to repository..."
|
||||
git clone https://github.com/DrHo1y/ezrknn-llm
|
||||
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
|
||||
@@ -29,10 +29,6 @@ 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 "Install python packages"
|
||||
cd /offline_packages
|
||||
python -m pip install --no-index --find-links . -r requirements.txt
|
||||
|
||||
message_print "Start Gradio server"
|
||||
cd /app
|
||||
python rkllm_server_gradio.py
|
||||
@@ -6,8 +6,8 @@ from model_class import *
|
||||
from mesh_utils import *
|
||||
|
||||
# Set environment variables
|
||||
os.environ["GRADIO_SERVER_NAME"] = "0.0.0.0"
|
||||
os.environ["GRADIO_SERVER_PORT"] = "8080"
|
||||
#os.environ["GRADIO_SERVER_NAME"] = "0.0.0.0"
|
||||
#os.environ["GRADIO_SERVER_PORT"] = 8080
|
||||
os.environ["RKLLM_LOG_LEVEL"] = "1"
|
||||
# Set resource limit
|
||||
resource.setrlimit(resource.RLIMIT_NOFILE, (102400, 102400))
|
||||
@@ -29,7 +29,7 @@ if __name__ == "__main__":
|
||||
print(init_msg)
|
||||
sys.stdout.flush()
|
||||
rkllm_model = RKLLMLoaderClass(model=model)
|
||||
model_init = f"RKLLM Model, {rkllm_model.model_name} has been initialized successfully!"
|
||||
model_init = f"RKLLM Model, {rkllm_model.model_name} has been initialized successfully!"
|
||||
print(model_init)
|
||||
complete_init = "=============================="
|
||||
print(complete_init)
|
||||
@@ -106,7 +106,13 @@ if __name__ == "__main__":
|
||||
# Enable the event queue system.
|
||||
chatRKLLM.queue()
|
||||
# Start the Gradio application.
|
||||
chatRKLLM.launch()
|
||||
chatRKLLM.launch(
|
||||
server_name="0.0.0.0",
|
||||
server_port=8080,
|
||||
share=False,
|
||||
show_error=True,
|
||||
quiet=False
|
||||
)
|
||||
|
||||
print("====================")
|
||||
print("RKLLM model inference completed, releasing RKLLM model resources...")
|
||||
|
||||
Reference in New Issue
Block a user