Update on_startup.sh
Browse files- on_startup.sh +24 -1
on_startup.sh
CHANGED
@@ -2,4 +2,27 @@
|
|
2 |
# Write some commands here that will run on root user before startup.
|
3 |
# For example, to clone transformers and install it in dev mode:
|
4 |
# git clone https://github.com/huggingface/transformers.git
|
5 |
-
# cd transformers && pip install -e ".[dev]"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
# Write some commands here that will run on root user before startup.
|
3 |
# For example, to clone transformers and install it in dev mode:
|
4 |
# git clone https://github.com/huggingface/transformers.git
|
5 |
+
# cd transformers && pip install -e ".[dev]"
|
6 |
+
|
7 |
+
# sudo -H pip install --upgrade pip
|
8 |
+
sudo -H pip install virtualenv
|
9 |
+
|
10 |
+
|
11 |
+
mkdir ~/my_project_dir
|
12 |
+
cd ~/my_project_dir
|
13 |
+
virtualenv my_project_env
|
14 |
+
source my_project_env/bin/activate
|
15 |
+
pip install jupyter
|
16 |
+
|
17 |
+
|
18 |
+
jupyter notebook \
|
19 |
+
--ip 0.0.0.0 \
|
20 |
+
--port 7183 \
|
21 |
+
--no-browser \
|
22 |
+
--allow-root \
|
23 |
+
--NotebookApp.token='a' \
|
24 |
+
--NotebookApp.password='' \
|
25 |
+
--NotebookApp.allow_origin='*' \
|
26 |
+
--NotebookApp.disable_check_xsrf=True \
|
27 |
+
--NotebookApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
|
28 |
+
--NotebookApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
|