Spaces:
Running
Running
Commit
•
2d23c5b
1
Parent(s):
8603f2e
Jupyter mounted on permanent storage by default if activated
Browse files- start_server.sh +9 -2
start_server.sh
CHANGED
@@ -1,8 +1,14 @@
|
|
1 |
#!/bin/bash
|
2 |
-
JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"
|
3 |
|
4 |
echo "Starting Jupyter Lab with token $JUPYTER_TOKEN"
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
jupyter-lab \
|
7 |
--ip 0.0.0.0 \
|
8 |
--port 7860 \
|
@@ -13,4 +19,5 @@ jupyter-lab \
|
|
13 |
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|
14 |
--ServerApp.disable_check_xsrf=True \
|
15 |
--LabApp.news_url=None \
|
16 |
-
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate"
|
|
|
|
1 |
#!/bin/bash
|
2 |
+
JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"
|
3 |
|
4 |
echo "Starting Jupyter Lab with token $JUPYTER_TOKEN"
|
5 |
|
6 |
+
NOTEBOOK_DIR="/app"
|
7 |
+
|
8 |
+
if [ -d "/data" ] && [ -w "/data" ]; then
|
9 |
+
NOTEBOOK_DIR="/data"
|
10 |
+
fi
|
11 |
+
|
12 |
jupyter-lab \
|
13 |
--ip 0.0.0.0 \
|
14 |
--port 7860 \
|
|
|
19 |
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|
20 |
--ServerApp.disable_check_xsrf=True \
|
21 |
--LabApp.news_url=None \
|
22 |
+
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
|
23 |
+
--notebook-dir=$NOTEBOOK_DIR
|