Create run.sh
Browse files
run.sh
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Start PostgreSQL as the postgres user using gosu
|
4 |
+
gosu postgres whoami && /usr/lib/postgresql/14/bin/pg_ctl -D /var/lib/postgresql/data start && echo"安装完成了?"
|
5 |
+
|
6 |
+
# Jupyter Lab setup
|
7 |
+
JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"
|
8 |
+
echo "Starting Jupyter Lab with token $JUPYTER_TOKEN"
|
9 |
+
|
10 |
+
NOTEBOOK_DIR="/data"
|
11 |
+
|
12 |
+
# Start Jupyter Lab as the user
|
13 |
+
gosu user jupyter-lab \
|
14 |
+
--ip 0.0.0.0 \
|
15 |
+
--port 7860 \
|
16 |
+
--no-browser \
|
17 |
+
--allow-root \
|
18 |
+
--ServerApp.token="$JUPYTER_TOKEN" \
|
19 |
+
--ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
|
20 |
+
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|
21 |
+
--ServerApp.disable_check_xsrf=True \
|
22 |
+
--LabApp.news_url=None \
|
23 |
+
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
|
24 |
+
--notebook-dir=$NOTEBOOK_DIR
|