forked from Emory-HITI/Niffler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
78 lines (72 loc) · 2.58 KB
/
install.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/sh
echo "Configuring Niffler"
sudo chmod -R 777 .
wget -qO- https://get.nextflow.io | bash
sudo mv nextflow /usr/local/bin
PIP=`head -n 1 init/pip.out`
if [ "$PIP" = false ] ; then
sudo yum install -y python3
echo "Installing pip"
sudo yum install python3-pip
pip install -r requirements.txt
pip install -i https://test.pypi.org/simple/ HITI-anon-internal
wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
sh Anaconda3-2020.11-Linux-x86_64.sh -u
source ~/.bashrc
rm Anaconda3-2020.11-Linux-x86_64.sh
echo "true" > init/pip.out
fi
MISC=`head -n 1 init/misc.out`
if [ "$MISC" = false ] ; then
echo "Installing gdcm and mail"
conda install -c conda-forge -y gdcm
sudo yum install mailx -y
sudo yum install sendmail sendmail-cf
chmod +x modules/meta-extraction/service/mdextractor.sh
echo "Disable THP"
sudo cp init/disable-thp.service /etc/systemd/system/disable-thp.service
sudo systemctl daemon-reload
sudo systemctl start disable-thp
sudo systemctl enable disable-thp
echo "true" > init/misc.out
fi
DCM4CHE=`head -n 1 init/dcm4che.out`
if [ "$DCM4CHE" = false ] ; then
echo "Installing JDK"
sudo yum install java-1.8.0-openjdk-devel
echo "Installing Maven"
sudo dnf install maven
echo "Installing DCM4CHE"
cd ..
wget https://sourceforge.net/projects/dcm4che/files/dcm4che3/5.22.5/dcm4che-5.22.5-bin.zip/download -O dcm4che-5.22.5-bin.zip
unzip dcm4che-5.22.5-bin.zip
rm dcm4che-5.22.5-bin.zip
cd Niffler
echo "true" > init/dcm4che.out
fi
MONGO=`head -n 1 init/mongo.out`
if [ "$MONGO" = false ] ; then
echo "Installing mongo"
sudo cp init/mongodb-org-4.2.repo /etc/yum.repos.d/
sudo yum install mongodb-org
sudo systemctl start mongod
sudo systemctl enable mongod
mongo init/mongoinit.js
sudo cp modules/meta-extraction/service/mdextractor.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start mdextractor.service
sudo systemctl enable mdextractor.service
echo "true" > init/mongo.out
fi
SERVICE=`head -n 1 init/service.out`
if [ "$SERVICE" = false ] ; then
echo "Installing Niffler Frontend"
pip install -r modules/frontend/requirements.txt
pip install -i https://test.pypi.org/simple/ HITI-anon-internal
chmod +x modules/frontend/service/frontend_service.sh
sudo cp modules/frontend/service/niffler.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start niffler.service
sudo systemctl enable niffler.service
echo "true" > init/service.out
fi