File size: 919 Bytes
819ff17
 
 
 
1c5eebf
25ad68c
f6a8357
accace2
fdc7539
accace2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9c8c8dd
 
 
 
 
4245a8b
 
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
#!/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]"

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/"