-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathaws-build.sh
46 lines (38 loc) · 1.54 KB
/
aws-build.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
39
40
41
42
43
44
45
46
#!/bin/bash
# avoid questions from debconf
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update && \
sudo apt-get upgrade -y
# for NEURON
sudo apt-get install -y git python3-dev python3-pip python3-psutil \
bison flex automake libtool libncurses-dev zlib1g-dev \
libopenmpi-dev openmpi-bin libqt5core5a libllvm6.0 \
libxaw7 libxmu6 libxpm4 libxcb-glx0 \
libxkbcommon-x11-0 libfontconfig libx11-xcb1 libxrender1 \
git vim iputils-ping net-tools iproute2 nano sudo \
telnet language-pack-en-base
sudo pip3 install pip --upgrade
sudo pip install matplotlib pyqt5 nlopt hnn-core
echo '# these lines define global session variables for HNN' >> ~/.bashrc
echo 'export OMPI_MCA_btl_base_warn_component_unused=0' >> ~/.bashrc
export OMPI_MCA_btl_base_warn_component_unused=0
cd $HOME && \
git clone https://github.com/jonescompneurolab/hnn && \
cd hnn
echo '#!/bin/bash' | sudo tee /usr/local/bin/hnn
echo 'cd $HOME/hnn' | sudo tee -a /usr/local/bin/hnn
echo 'python3 hnn.py' | sudo tee -a /usr/local/bin/hnn
sudo chmod 755 /usr/local/bin/hnn
# prepare image - only use if creating an AMI
# sudo apt-get install -y ec2-ami-tools
# echo "PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
# sudo passwd -l root
# sudo rm -rf /tmp/*
# sudo shred -u $HOME/.*history
# rm -f ~/.sudo_as_admin_successful
# rm -f ~/.viminfo
# rm -f ~/.Xauthority
# sudo rm -rf $HOME/.cache/
# rm -rf ~/.gnupg/
# rm -rf ~/.config/
# rm -rf ~/.ssh/