1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jupyterlab_ynh.git synced 2024-09-03 19:26:35 +02:00
This commit is contained in:
Éric Gaspar 2023-02-26 19:58:43 +01:00
parent 9c0341d0b6
commit 83da713cf0
5 changed files with 17 additions and 10 deletions

View file

@ -171,7 +171,7 @@ c.JupyterHub.bind_url = 'http://:__PORT____PATH__'
#c.JupyterHub.cookie_secret_file = 'jupyterhub_cookie_secret'
## The location of jupyterhub data files (e.g. /usr/local/share/jupyterhub)
c.JupyterHub.data_files_path = '__FINAL_PATH__/.venv/share/jupyterhub'
c.JupyterHub.data_files_path = '__INSTALL_DIR__/.venv/share/jupyterhub'
## Include any kwargs to pass to the database connection. See
# sqlalchemy.create_engine for details.
@ -589,7 +589,7 @@ c.JupyterHub.spawner_class = 'sudospawner.SudoSpawner'
# Some spawners allow shell-style expansion here, allowing you to use
# environment variables here. Most, including the default, do not. Consult the
# documentation for your spawner to verify!
c.Spawner.args = ['--config=__FINAL_PATH__/config/jupyter_notebook_config.py']
c.Spawner.args = ['--config=__INSTALL_DIR__/config/jupyter_notebook_config.py']
## An optional hook function that you can implement to pass `auth_state` to the
# spawner after it has been initialized but before it starts. The `auth_state`

View file

@ -1,3 +1,4 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
proxy_pass http://localhost:__PORT__;

View file

@ -6,7 +6,7 @@ source /usr/share/yunohost/helpers
app="${0//.\/50-}"
user=$1
final_path="$(ynh_app_setting_get --app=$app --key=final_path)"
install_dir="$(ynh_app_setting_get --app=$app --key=install_dir)"
enable_extensions="$(ynh_app_setting_get --app=$app --key=enable_extensions)"
ynh_use_nodejs
@ -14,5 +14,5 @@ ynh_use_nodejs
if [ $enable_extensions -eq 1 ]; then
export JUPYTERLAB_DIR="$(getent passwd $user | cut -d: -f6)/.local/share/$app/lab"
node_path="$nodejs_path:$(sudo -u $user sh -c 'echo $PATH')"
sudo -u $user env "PATH=$node_path:$PATH" "$final_path/.venv/bin/jupyter" lab build --app-dir="$JUPYTERLAB_DIR"
sudo -u $user env "PATH=$node_path:$PATH" "$install_dir/.venv/bin/jupyter" lab build --app-dir="$JUPYTERLAB_DIR"
fi

View file

@ -29,16 +29,13 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
[install]
[install.domain]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "domain"
[install.path]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "path"
default = "/jupyterlab"
[install.admin]
# this is a generic question - ask strings are automatically handled by Yunohost's core
type = "user"
[install.init_main_permission]
@ -58,9 +55,21 @@ ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requiremen
default = true
[resources]
[resources.ports]
main.default = 8080
hub.default = 8081
http_proxy.default = 8082
[resources.system_user]
[resources.install_dir]
[resources.permissions]
main.url = "/"
[resources.apt]
packages = "python3-dev python3-pip"
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
extras.yarn.packages = "yarn"

View file

@ -4,9 +4,6 @@
# COMMON VARIABLES
#=================================================
# dependencies used by the app
#REMOVEME? pkg_dependencies="python3-dev python3-pip libffi-dev libzmq3-dev"
nodejs_version="16"
jupyterlab_version="3.2.5"