Compare commits
3 Commits
7244d265fa
...
606b6c8ff9
Author | SHA1 | Date | |
---|---|---|---|
|
606b6c8ff9 | ||
|
d890e88f16 | ||
|
4286fc8a20 |
11
helper.sh
11
helper.sh
@ -39,21 +39,20 @@ enable_venv(){
|
||||
|
||||
case "$1" in
|
||||
i|-i|install|--install)
|
||||
python -m venv "$VENV_PATH"
|
||||
mkdir -p "$JUPYTER_ROOT_PATH"/{settings,workspace,config,runtime,data} "$JUPYTERLAB_SETTINGS_DIR"/@jupyterlab/{notebook-extension,extensionmanager-extension,apputils-extension}
|
||||
python -m venv --upgrade-deps "$VENV_PATH"
|
||||
mkdir -pv "$JUPYTERLAB_SETTINGS_DIR"/@jupyterlab/{notebook-extension,extensionmanager-extension,apputils-extension}
|
||||
# Setting it to zero doesn't have the expected result, therefore, let's set it to an abnormally large number.
|
||||
echo '{ "maxNumberOutputs": 10000000000 }' > "$JUPYTERLAB_SETTINGS_DIR"/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
|
||||
echo '{ "disclaimed": true }' > "$JUPYTERLAB_SETTINGS_DIR"/@jupyterlab/extensionmanager-extension/plugin.jupyterlab-settings
|
||||
echo '{ "theme": "JupyterLab Dark" }' > "$JUPYTERLAB_SETTINGS_DIR"/@jupyterlab/apputils-extension/themes.jupyterlab-settings
|
||||
echo '{ "fetchNews": "false" }' > "$JUPYTERLAB_SETTINGS_DIR"/@jupyterlab/apputils-extension/notification.jupyterlab-settings
|
||||
enable_venv "$2"
|
||||
python -m pip install --timeout 120 --retries 10000000000 -U pip setuptools
|
||||
pip install --timeout 120 --retries 10000000000 -r requirements.txt
|
||||
pip install --timeout 120 --retries 1000000000000 -r requirements.txt
|
||||
;;
|
||||
|
||||
k|-k|kernel|--kernel)
|
||||
enable_venv "$2"
|
||||
mkdir -p "$R_LIBS_SITE"
|
||||
mkdir -pv "$R_LIBS_SITE"
|
||||
if command -v Rscript >> /dev/null; then
|
||||
Rscript -e 'install.packages("IRkernel",repos="http://cran.r-project.org");library(IRkernel);IRkernel::installspec()'
|
||||
else
|
||||
@ -74,7 +73,7 @@ case "$1" in
|
||||
;;
|
||||
|
||||
U|-U|uninstall|--uninstall)
|
||||
rm -rf "$VENV_PATH" "$JUPYTER_ROOT_PATH" "$R_LIBS_SITE"
|
||||
rm -rfv "$VENV_PATH" "$JUPYTER_ROOT_PATH" "$R_LIBS_SITE" .ipynb_checkpoints __pycache__
|
||||
;;
|
||||
|
||||
l|-l|launch|--launch)
|
||||
|
Loading…
x
Reference in New Issue
Block a user