Spaces:
Running
Running
Commit
•
79edacd
1
Parent(s):
8603f2e
Jupyter mounted on permanent storage by default if activated (#4)
Browse files- Jupyter mounted on permanent storage by default if activated (2d23c5b1bb907c88ff42576391cbfb3212d65452)
- Update Dockerfile (b4533e125821d978f852cb6c7980072151471d00)
- Update start_server.sh (f6684367e403879a5d76ddb23f7f0b0b7a994a1a)
Co-authored-by: Apolinário from multimodal AI art <multimodalart@users.noreply.huggingface.co>
- 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
|