forked from labdao/plex
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
155 lines (139 loc) · 5.86 KB
/
install.sh
File metadata and controls
155 lines (139 loc) · 5.86 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
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/bin/bash
setOSandArch() {
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(arch)
}
makeParentFolder() {
mkdir plex
cd plex
}
makeConfigFolder() {
mkdir config
}
downloadPlex() {
if [[ ! -x plex ]]; then
echo "Downloading Plex..."
setOSandArch
LATEST_RELEASE=$(curl -s https://api.github.com/repos/labdao/plex/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
RELEASE_WITHOUT_V=${LATEST_RELEASE#v}
if [ "$OS" = "darwin" ]
then
if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "x86_64" ]
then
curl -sSL https://github.com/labdao/plex/releases/download/$LATEST_RELEASE/plex_${RELEASE_WITHOUT_V}_darwin_amd64.tar.gz | tar xvz
elif [ "$ARCH" = "arm64" ]
then
curl -sSL https://github.com/labdao/plex/releases/download/$LATEST_RELEASE/plex_${RELEASE_WITHOUT_V}_darwin_arm64.tar.gz | tar xvz
else
echo "Cannot install Plex. Unsupported architecture for Darwin OS: $ARCH"
fi
elif [ "$OS" = "linux" ]
then
if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "x86_64" ]
then
curl -sSL https://github.com/labdao/plex/releases/download/$LATEST_RELEASE/plex_${RELEASE_WITHOUT_V}_linux_amd64.tar.gz | tar xvz
else
echo "Cannot install Plex. Unsupported architecture for Linux: $ARCH"
fi
elif [ "$OS" = "windows" ]
then
if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "x86_64" ]
then
curl -sSL https://github.com/labdao/plex/releases/download/$LATEST_RELEASE/plex_${RELEASE_WITHOUT_V}_windows_amd64.tar.gz
else
echo "Cannot install Plex. Unsupported architecture for Windows: $ARCH"
fi
fi
fi
}
getAppJsonl() {
cd config
curl -sSL -O https://raw.githubusercontent.com/labdao/plex/main/config/app.jsonl
cd ..
}
getInstructionsTemplateJsonl() {
cd config
curl -sSL -O https://raw.githubusercontent.com/labdao/plex/main/config/instruction_template.jsonl
cd ..
}
getTools() {
echo "Downloading tools..."
mkdir -p tools
curl -sL -O https://github.com/labdao/plex/archive/refs/heads/main.zip
unzip -qq main.zip && mv plex-main/tools/*.json tools/ && rm -rf plex-main
rm -f main.zip
}
getTestData() {
echo "Downloading test data..."
mkdir -p testdata
curl -sL -O https://github.com/labdao/plex/archive/refs/heads/main.zip
unzip -qq main.zip && mv plex-main/testdata/* testdata/ && rm -rf plex-main
rm -f main.zip
}
displayLogo() {
logo="
@
@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@
@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@
@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@
*@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@
@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@% &@@@@@@@@@@
@@@@ @@@@@@@@@@@@@@@@@@& @@@@
@@@@@@@@
@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@ ,@@@@@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loadPlex
getAppJsonl
getInstructionsTemplateJsonl
getTestData
getTools
displayLogo
echo "Installation complete. Welcome to LabDAO! Documentation at https://github.com/labdao/plex"
echo "To get started, please run the following steps:"
echo "1. Please change the permissions of plex on your system:"
echo "chmod +x ./plex"
echo "2. Please add your access token to use plex. To request an access token, visit https://whe68a12b61.typeform.com/to/PpbO2HYf"
echo "export PLEX_ACCESS_TOKEN=<your access token>"
echo "3. [Linux only] If you recieve a warning about download speeds on Linux you can optionally run:"
echo "sudo sysctl -w net.core.rmem_max=2500000"
echo "After these steps, you're ready to generate computational biology data! Run the following command to run Equibind on test data:"
echo "./plex -tool equibind -input-dir testdata/binding/abl"