Download on_startup.sh from zhzabcd/code: direct link, hf CLI and curl.
- Browser
- Download file 919 Bytes
-
https://huggingface.co/spaces/zhzabcd/code/resolve/main/on_startup.sh
- Command line
-
hf download hf://spaces/zhzabcd/code/on_startup.sh
-
curl -L -o on_startup.sh https://huggingface.co/spaces/zhzabcd/code/resolve/main/on_startup.sh
919 Bytes
| # 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]" | |
| npm i -g tsx tslab http-server miniflare@2 | |
| sudo chown -R 1000:1000 "/home/user/" | |
| tslab install | |
| echo ' | |
| # >>> conda initialize >>> | |
| __conda_setup="$(/home/user/miniconda/bin/conda shell.bash hook 2> /dev/null)" | |
| if [ $? -eq 0 ]; then | |
| eval "$__conda_setup" | |
| else | |
| if [ -f "/home/user/miniconda/etc/profile.d/conda.sh" ]; then | |
| . "/home/user/miniconda/etc/profile.d/conda.sh" | |
| else | |
| export PATH="/home/user/miniconda/bin:$PATH" | |
| fi | |
| fi | |
| unset __conda_setup | |
| # <<< conda initialize <<< | |
| ' >> ~/.bashrc | |
| apt-config dump | grep Sandbox::User | |
| cat <<EOF > /etc/apt/apt.conf.d/sandbox-disable | |
| APT::Sandbox::User "root"; | |
| EOF | |
| sudo chown -R 1000:1000 "/usr/" |