testspace / on_startup.sh
Kamtera's picture
Update on_startup.sh
9542ce3
raw
history blame contribute delete
No virus
1.02 kB
#!/bin/bash
# Write some commands here that will run on root user before startup.
# For example, to clone transformers and install it in dev mode:
# git clone https://github.com/huggingface/transformers.git
# cd transformers && pip install -e ".[dev]"
# sudo -H pip install --upgrade pip
# sudo -H pip install virtualenv
# mkdir ~/my_project_dir
# cd ~/my_project_dir
# virtualenv my_project_env
# source my_project_env/bin/activate
# pip install jupyter
# JUPYTER_TOKENT="${JUPYTER_TOKENT:=huggingface}"
# echo "Starting Jupyter Lab with token $JUPYTER_TOKENT"
# jupyter notebook \
# --ip 0.0.0.0 \
# --port 7183 \
# --no-browser \
# --allow-root \
# --NotebookApp.token="$JUPYTER_TOKENT" \
# --NotebookApp.password='' \
# --NotebookApp.allow_origin='*' \
# --NotebookApp.disable_check_xsrf=True \
# --NotebookApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
# --NotebookApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \