From e044f93458b7a0d23e81c77ae88ea3cb1e1808ec Mon Sep 17 00:00:00 2001 From: Xing Wang Date: Thu, 23 May 2024 13:38:30 +0200 Subject: [PATCH] Install plugin with `--user` option for persistence (#744) To ensure the package remains installed after server restarts, install the package into the home directory using the --user option. This directory is mounted as a Docker volume, ensuring the package is preserved across server restarts. --- plugin_list.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin_list.ipynb b/plugin_list.ipynb index 0f65e0b5..a3db71ff 100644 --- a/plugin_list.ipynb +++ b/plugin_list.ipynb @@ -99,9 +99,9 @@ "\n", "def install_package(package_name, pip, github, output_container, message_container, install_btn, remove_btn, accordion, index):\n", " if pip:\n", - " command = [\"pip\", \"install\", pip]\n", + " command = [\"pip\", \"install\", pip, \"--user\"]\n", " else:\n", - " command = [\"pip\", \"install\", \"git+\" + github]\n", + " command = [\"pip\", \"install\", \"git+\" + github, \"--user\"]\n", " message_container.value = f\"\"\"
Installing {package_name}...
\"\"\"\n", " result = execute_command_with_output(command, output_container, install_btn, remove_btn)\n", " # if the package was installed successfully\n",