-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·42 lines (29 loc) · 1.03 KB
/
install.sh
File metadata and controls
executable file
·42 lines (29 loc) · 1.03 KB
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
#!/bin/bash
# Check if the correct number of arguments are provided
if [ "$#" -ne 1 ]; then
echo "Usage: $0 YYYYMMDDHHMM"
exit 1
fi
# Get the correct date and time from the input argument
datetime=$1
# Set the correct date and time
sudo date -s "$datetime"
# Wait 30 seconds
sleep 30
# Download the miniforge installer
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O /tmp/Miniforge3-Linux-x86_64.sh
# Install miniforge to userspace silently
bash /tmp/Miniforge3-Linux-x86_64.sh -b -p $HOME/miniforge3
# Initialize conda
$HOME/miniforge3/bin/conda init
# Install Jupyter Notebook, numpy, scipy, and matplotlib
$HOME/miniforge3/bin/conda install -y jupyter numpy scipy matplotlib
# Install git
sudo apt-get update && sudo apt-get install -y git
# Clone the repository
git clone https://github.com/hariseldon99/msph306 $HOME/msph306
# Remove base environment from bashrc
sed -i '/conda activate base/d' $HOME/.bashrc
# Reload bashrc
source $HOME/.bashrc
echo "Installation complete"