-
Notifications
You must be signed in to change notification settings - Fork 0
/
InitServer.sh
39 lines (39 loc) · 1.62 KB
/
InitServer.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
# PASS AS ARGUMENTS
# $1 : YOUR PHONE NUMBER FOR TWILIO CLIENT
# $2 : YOUR TWILIO ACCOUNT SID
# $3 : YOUR TWILIO AUTHENTICATION TOKEN
################################################################################
# Install anaconda #
################################################################################
#sudo apt-get update
#sudo apt-get install build-essential
#sudo apt-get install tmux
sudo apt-get install curl
cd /tmp
# Download appropriate version of anaconda
curl https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh --output anaconda.sh
# I go irresponsibly not checking the .sh file
bash anaconda.sh
################################################################################
# Create env vars for twilio #
################################################################################
phone=$1
twilio_account_sdi=$2
twilio_auth_tok=$3
# Initialise environment variables
setmyphone=$"export MYPHONE=${phone}"
settwacc=$"export TWILIO_ACCOUNT_SID=${twilio_account_sdi}"
settwauth=$"export TWILIO_AUTH_TOKEN=${twilio_auth_tok}"
echo "$setmyphone" >> ~/.bashrc
echo "$settwacc" >> ~/.bashrc
echo "$settwauth" >> ~/.bashrc
# Activate environment
source ~/.bashrc
source ~/.bashrc
################################################################################
# Create local environment #
################################################################################
conda create --name Datagen
conda deactivate
conda activate Datagen
pip install twilio