Difference between revisions of "Team:USTC-Software/Installation"

(Created page with "<html> <head> <meta charset="UTF-8"> <title>Team:USTC-Software - 2016.igem.org</title> <link rel="stylesheet" type="text/css" href="https://2016.igem.org/Template:UST...")
 
Line 75: Line 75:
 
We suggest users use Docker to deploy BioHub. It just needs two steps:
 
We suggest users use Docker to deploy BioHub. It just needs two steps:
 
</p>
 
</p>
<p>
+
<p style="font-family:'Courier New' !important">
<pre>
+
docker run -d --name biohubdb -e MYSQL_ROOT_PASSWORD=password mysql
docker run -d --name biohubdb -e MYSQL_ROOT_PASSWORD=password mysql
+
<br />
docker run -d --name biohub --link biohubdb:db -p 80:5000 biohubtech/biohub
+
docker run -d --name biohub --link biohubdb:db -p 80:5000 biohubtech/biohub
</pre>
+
 
</p>
 
</p>
 
<p>
 
<p>
You can also use <pre>-e BIOHUB_DB_HOST=&lt;host&gt;</pre> and/or <pre>-e BIOHUB_DB_USER=<user> -e BIOHUB_DB_PASSWORD=&lt;password&gt;</pre> to connect to other databases.
+
You can also use <span style="font-family:'Courier New' !important">-e BIOHUB_DB_HOST=&lt;host&gt;<span> and/or <span style="font-family:'Courier New' !important">-e BIOHUB_DB_USER=<user> -e BIOHUB_DB_PASSWORD=&lt;password&gt;</span> to connect to other databases.
 
</p>
 
</p>
 
<p>
 
<p>
 
Also, you can clone the repo and run it manually. We've tested this on Debian 8:
 
Also, you can clone the repo and run it manually. We've tested this on Debian 8:
 
</p>
 
</p>
<p>
+
<p style="font-family:'Courier New' !important">
<pre>
+
sudo apt update
sudo apt update
+
sudo apt install git python3 python3-pip python3-biopython python3-flask python3-sqlalchemy python3-scipy libmysqlclient-dev mysql-server mysql-client wget
sudo apt install git python3 python3-pip python3-biopython python3-flask python3-sqlalchemy python3-scipy libmysqlclient-dev mysql-server mysql-client wget
+
git clone https://github.com/igemsoftware2016/USTC-Software-2016.git
git clone https://github.com/igemsoftware2016/USTC-Software-2016.git
+
cd USTC-Software-2016
cd USTC-Software-2016
+
sudo pip3 install flask_login mysqlclient pymysql
sudo pip3 install flask_login mysqlclient pymysql
+
echo CREATE DATABASE biohub | mysql -u&lt;user&gt; -p # please fill in the blanks
echo CREATE DATABASE biohub | mysql -u&lt;user&gt; -p # please fill in the blanks
+
wget http://parts.igem.org/partsdb/download.cgi?type=parts_sql -O biobricks.sql.gz
wget http://parts.igem.org/partsdb/download.cgi?type=parts_sql -O biobricks.sql.gz
+
gunzip biobricks.sql.gz
gunzip biobricks.sql.gz
+
mysql -u&lt;user&gt; -p biohub &lt; biobricks.sql # please fill in the blanks
mysql -u&lt;user&gt; -p biohub &lt; biobricks.sql # please fill in the blanks
+
echo "DATABASE_URI = 'mysql://&lt;username&gt;:&lt;password&gt;@localhost/biohub'" &gt;config.py # please fill in the blanks
echo "DATABASE_URI = 'mysql://&lt;username&gt;:&lt;password&gt;@localhost/biohub'" &gt;config.py # please fill in the blanks
+
echo "SECRET_KEY = '&lt;a random string&gt;'" &gt;&gt;config.py # please fill in the blanks
echo "SECRET_KEY = '&lt;a random string&gt;'" &gt;&gt;config.py # please fill in the blanks
+
./run.py
./run.py
+
# then the server will start on port 5000
# then the server will start on port 5000
+
</pre>
+
 
</p>
 
</p>
 
</div>
 
</div>

Revision as of 23:05, 19 October 2016

Team:USTC-Software - 2016.igem.org


Install BioHub

We suggest users use Docker to deploy BioHub. It just needs two steps:

docker run -d --name biohubdb -e MYSQL_ROOT_PASSWORD=password mysql
docker run -d --name biohub --link biohubdb:db -p 80:5000 biohubtech/biohub

You can also use -e BIOHUB_DB_HOST=<host> and/or -e BIOHUB_DB_USER= -e BIOHUB_DB_PASSWORD=<password> to connect to other databases.

Also, you can clone the repo and run it manually. We've tested this on Debian 8:

sudo apt update sudo apt install git python3 python3-pip python3-biopython python3-flask python3-sqlalchemy python3-scipy libmysqlclient-dev mysql-server mysql-client wget git clone https://github.com/igemsoftware2016/USTC-Software-2016.git cd USTC-Software-2016 sudo pip3 install flask_login mysqlclient pymysql echo CREATE DATABASE biohub | mysql -u<user> -p # please fill in the blanks wget http://parts.igem.org/partsdb/download.cgi?type=parts_sql -O biobricks.sql.gz gunzip biobricks.sql.gz mysql -u<user> -p biohub < biobricks.sql # please fill in the blanks echo "DATABASE_URI = 'mysql://<username>:<password>@localhost/biohub'" >config.py # please fill in the blanks echo "SECRET_KEY = '<a random string>'" >>config.py # please fill in the blanks ./run.py # then the server will start on port 5000


Links

USTC

Biopano


Contact Us

igemustc2016@gmail.com

No.96, JinZhai RD., Hefei, Anhui, PRC.