forked from alishobeiri/thread
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
38 lines (29 loc) · 1.08 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status.
# Check if ./server_extension/thread/static exists, create it if not
if [ ! -d "./server_extension/thread/static" ]; then
mkdir -p ./server_extension/thread/static
fi
# Check if source directory ./out exists
if [ ! -d "./out" ]; then
echo "Source directory ./out does not exist. Aborting."
exit 1
fi
# Move files from ./out to server_extension/thread/static
cp -r ./out/* ./server_extension/thread/static/
# Verify that files have been copied
if [[ "$(ls -A ./server_extension/thread/static)" ]]; then
echo "Files successfully copied to ./server_extension/thread/static"
else
echo "No files were copied to ./server_extension/thread/static. Aborting."
exit 1
fi
# Uninstall and reinstall thread package
pip uninstall -y thread-dev
pip install -e ./server_extension --no-cache-dir
# Enable Jupyter server extension for thread
jupyter server extension enable thread
# Clean up log file
rm -f jupyter_server.log
# Start the Jupyter server with specified configurations
jupyter thread --Application.log_level=0