]> git.parisson.com Git - telemeta.git/commitdiff
Use data/media/notebooks by default for notebooks (see settings)
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 6 Nov 2017 22:47:31 +0000 (23:47 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 6 Nov 2017 22:47:31 +0000 (23:47 +0100)
app/scripts/app.sh [changed mode: 0644->0755]
app/scripts/init.sh [changed mode: 0644->0755]
app/scripts/install_plugins.sh [changed mode: 0644->0755]
app/scripts/modelviz.py [changed mode: 0644->0755]
app/scripts/notebook.sh [new file with mode: 0755]
app/scripts/setup_plugins.sh [changed mode: 0644->0755]
app/scripts/wait.sh [changed mode: 0644->0755]
app/scripts/worker.sh [changed mode: 0644->0755]
app/settings.py
env/notebook.yml

old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/app/scripts/notebook.sh b/app/scripts/notebook.sh
new file mode 100755 (executable)
index 0000000..562f9df
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+export PYTHONPATH=$PYTHONPATH:/opt/miniconda/lib/python2.7/site-packages/:/srv/app/
+export DJANGO_SETTINGS_MODULE=settings
+
+python /srv/app/manage.py shell_plus --notebook
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index d6e37eaa3b233e98879598b81e9945e2e24d7976..9eb3af712a3e1a7c0099b429e1ee0322fb854bcd 100644 (file)
@@ -367,11 +367,14 @@ BOWER_INSTALLED_APPS = (
     # 'https://github.com/Parisson/ui.git',
 )
 
+NOTEBOOK_DIR = MEDIA_ROOT + 'notebooks'
+if not os.path.exists(NOTEBOOK_DIR):
+    os.makedirs(NOTEBOOK_DIR)
 
 NOTEBOOK_ARGUMENTS = [
     '--ip=0.0.0.0', # reach notebooks from outside
     '--port=8888',  # std port
     '--no-browser', # don't start browser on start
     '--allow-root',
-    '--notebook-dir', '/srv/app'
+    '--notebook-dir', NOTEBOOK_DIR
 ]
index c11a40d2979cf0ff90d2b6003ad3d4e123f1f570..1c234ae04c1578eca44f803edd07d1ae68218673 100644 (file)
@@ -24,4 +24,4 @@
 app:
   ports:
     - "8888:8888"
-  command: "python manage.py shell_plus --notebook"
+  command: "/srv/app/scripts/notebook.sh"