atonyxu
commited on
Commit
·
d9d4cb0
1
Parent(s):
01781b6
code
Browse files- start_server.sh +4 -1
start_server.sh
CHANGED
|
@@ -1,5 +1,8 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"
|
|
|
|
|
|
|
|
|
|
| 3 |
sed -i '/password/d' /home/user/.config/code-server/config.yaml
|
| 4 |
echo "password: ${JUPYTER_TOKEN}" >> /home/user/.config/code-server/config.yaml
|
| 5 |
cat /home/user/.config/code-server/config.yaml
|
|
@@ -21,6 +24,6 @@ nohup jupyter-lab \
|
|
| 21 |
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
|
| 22 |
--notebook-dir=$NOTEBOOK_DIR > /data/jupyter.log 2>&1 &
|
| 23 |
|
| 24 |
-
sleep
|
| 25 |
ps aux | grep 'jupyter' | grep -v 'grep' | awk '{print $2}' | xargs kill -9
|
| 26 |
code-server --bind-addr 0.0.0.0:8080 /data > /data/start.log 2>&1 &
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"
|
| 3 |
+
nohup code-server --bind-addr 0.0.0.0:8080 /data > /tmp/code.log 2>&1 &
|
| 4 |
+
sleep 5s
|
| 5 |
+
ps aux | grep 'code-server' | grep -v 'grep' | awk '{print $2}' | xargs kill -9
|
| 6 |
sed -i '/password/d' /home/user/.config/code-server/config.yaml
|
| 7 |
echo "password: ${JUPYTER_TOKEN}" >> /home/user/.config/code-server/config.yaml
|
| 8 |
cat /home/user/.config/code-server/config.yaml
|
|
|
|
| 24 |
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
|
| 25 |
--notebook-dir=$NOTEBOOK_DIR > /data/jupyter.log 2>&1 &
|
| 26 |
|
| 27 |
+
sleep 10s
|
| 28 |
ps aux | grep 'jupyter' | grep -v 'grep' | awk '{print $2}' | xargs kill -9
|
| 29 |
code-server --bind-addr 0.0.0.0:8080 /data > /data/start.log 2>&1 &
|