Spaces:
Running
Running
Jupyter mounted on permanent storage by default if activated
#4
by
multimodalart
HF staff
- opened
- Dockerfile +2 -0
- start_server.sh +5 -2
Dockerfile
CHANGED
@@ -71,6 +71,8 @@ RUN --mount=target=/root/packages.txt,source=packages.txt \
|
|
71 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
72 |
bash /root/on_startup.sh
|
73 |
|
|
|
|
|
74 |
#######################################
|
75 |
# End root user section
|
76 |
#######################################
|
|
|
71 |
RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
|
72 |
bash /root/on_startup.sh
|
73 |
|
74 |
+
RUN mkdir /data && chown user:user /data
|
75 |
+
|
76 |
#######################################
|
77 |
# End root user section
|
78 |
#######################################
|
start_server.sh
CHANGED
@@ -1,8 +1,10 @@
|
|
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 +15,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="/data"
|
7 |
+
|
8 |
jupyter-lab \
|
9 |
--ip 0.0.0.0 \
|
10 |
--port 7860 \
|
|
|
15 |
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|
16 |
--ServerApp.disable_check_xsrf=True \
|
17 |
--LabApp.news_url=None \
|
18 |
+
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
|
19 |
+
--notebook-dir=$NOTEBOOK_DIR
|