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

Line 251: Line 251:
 
</div>
 
</div>
 
<style>
 
<style>
 +
body .markdown-body
 +
{
 +
  padding: 45px;
 +
}
 +
.markdown-body {
 +
  font-family: sans-serif;
 +
  -ms-text-size-adjust: 100%;
 +
  -webkit-text-size-adjust: 100%;
 +
  color: #333333;
 +
  overflow: hidden;
 +
  font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
 +
  font-size: 16px;
 +
  line-height: 1.6;
 +
  word-wrap: break-word;
 +
}
 +
 +
.markdown-body a {
 +
  background: transparent;
 +
}
 +
 +
.markdown-body a:active,
 +
.markdown-body a:hover {
 +
  outline: 0;
 +
}
 +
 +
.markdown-body b,
 +
.markdown-body strong {
 +
  font-weight: bold;
 +
}
 +
 +
.markdown-body mark {
 +
  background: #ff0;
 +
  color: #000;
 +
  font-style: italic;
 +
  font-weight: bold;
 +
}
 +
 +
.markdown-body sub,
 +
.markdown-body sup {
 +
  font-size: 75%;
 +
  line-height: 0;
 +
  position: relative;
 +
  vertical-align: baseline;
 +
}
 +
.markdown-body sup {
 +
  top: -0.5em;
 +
}
 +
.markdown-body sub {
 +
  bottom: -0.25em;
 +
}
 +
 +
.markdown-body h1 {
 +
  font-size: 2em;
 +
  margin: 0.67em 0;
 +
}
 +
 +
.markdown-body img {
 +
  border: 0;
 +
}
 +
 +
.markdown-body hr {
 +
  -moz-box-sizing: content-box;
 +
  box-sizing: content-box;
 +
  height: 0;
 +
}
 +
 +
.markdown-body pre {
 +
  overflow: auto;
 +
}
 +
 +
.markdown-body code,
 +
.markdown-body kbd,
 +
.markdown-body pre,
 +
.markdown-body samp {
 +
  font-family: monospace, monospace;
 +
  font-size: 1em;
 +
}
 +
 +
.markdown-body input {
 +
  color: inherit;
 +
  font: inherit;
 +
  margin: 0;
 +
}
 +
 +
.markdown-body html input[disabled] {
 +
  cursor: default;
 +
}
 +
 +
.markdown-body input {
 +
  line-height: normal;
 +
}
 +
 +
.markdown-body input[type="checkbox"] {
 +
  box-sizing: border-box;
 +
  padding: 0;
 +
}
 +
 +
.markdown-body table {
 +
  border-collapse: collapse;
 +
  border-spacing: 0;
 +
}
 +
 +
.markdown-body td,
 +
.markdown-body th {
 +
  padding: 0;
 +
}
 +
 +
.markdown-body .codehilitetable {
 +
  border: 0;
 +
  border-spacing: 0;
 +
}
 +
 +
.markdown-body .codehilitetable tr {
 +
  border: 0;
 +
}
 +
 +
.markdown-body .codehilitetable pre,
 +
.markdown-body .codehilitetable div.codehilite {
 +
  margin: 0;
 +
}
 +
 +
.markdown-body .linenos,
 +
.markdown-body .code,
 +
.markdown-body .codehilitetable td {
 +
  border: 0;
 +
  padding: 0;
 +
}
 +
 +
.markdown-body td:not(.linenos) .linenodiv {
 +
  padding: 0 !important;
 +
}
 +
 +
.markdown-body .code {
 +
  width: 100%;
 +
}
 +
 +
.markdown-body .linenos div pre,
 +
.markdown-body .linenodiv pre,
 +
.markdown-body .linenodiv {
 +
  border: 0;
 +
  -webkit-border-radius: 0;
 +
  -moz-border-radius: 0;
 +
  border-radius: 0;
 +
  -webkit-border-top-left-radius: 3px;
 +
  -webkit-border-bottom-left-radius: 3px;
 +
  -moz-border-radius-topleft: 3px;
 +
  -moz-border-radius-bottomleft: 3px;
 +
  border-top-left-radius: 3px;
 +
  border-bottom-left-radius: 3px;
 +
}
 +
 +
.markdown-body .code div pre,
 +
.markdown-body .code div {
 +
  border: 0;
 +
  -webkit-border-radius: 0;
 +
  -moz-border-radius: 0;
 +
  border-radius: 0;
 +
  -webkit-border-top-right-radius: 3px;
 +
  -webkit-border-bottom-right-radius: 3px;
 +
  -moz-border-radius-topright: 3px;
 +
  -moz-border-radius-bottomright: 3px;
 +
  border-top-right-radius: 3px;
 +
  border-bottom-right-radius: 3px;
 +
}
 +
 +
.markdown-body * {
 +
  -moz-box-sizing: border-box;
 +
  box-sizing: border-box;
 +
}
 +
 +
.markdown-body input {
 +
  font: 13px Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
 +
  line-height: 1.4;
 +
}
 +
 +
.markdown-body a {
 +
  color: #4183c4;
 +
  text-decoration: none;
 +
}
 +
 +
.markdown-body a:hover,
 +
.markdown-body a:focus,
 +
.markdown-body a:active {
 +
  text-decoration: underline;
 +
}
 +
 +
.markdown-body hr {
 +
  height: 0;
 +
  margin: 15px 0;
 +
  overflow: hidden;
 +
  background: transparent;
 +
  border: 0;
 +
  border-bottom: 1px solid #ddd;
 +
}
 +
 +
.markdown-body hr:before,
 +
.markdown-body hr:after {
 +
  display: table;
 +
  content: " ";
 +
}
 +
 +
.markdown-body hr:after {
 +
  clear: both;
 +
}
 +
 +
.markdown-body h1,
 +
.markdown-body h2,
 +
.markdown-body h3,
 +
.markdown-body h4,
 +
.markdown-body h5,
 +
.markdown-body h6 {
 +
  margin-top: 15px;
 +
  margin-bottom: 15px;
 +
  line-height: 1.1;
 +
}
 +
 +
.markdown-body h1 {
 +
  font-size: 30px;
 +
}
 +
 +
.markdown-body h2 {
 +
  font-size: 21px;
 +
}
 +
 +
.markdown-body h3 {
 +
  font-size: 16px;
 +
}
 +
 +
.markdown-body h4 {
 +
  font-size: 14px;
 +
}
 +
 +
.markdown-body h5 {
 +
  font-size: 12px;
 +
}
 +
 +
.markdown-body h6 {
 +
  font-size: 11px;
 +
}
 +
 +
.markdown-body blockquote {
 +
  margin: 0;
 +
}
 +
 +
.markdown-body ul,
 +
.markdown-body ol {
 +
  padding: 0;
 +
  margin-top: 0;
 +
  margin-bottom: 0;
 +
}
 +
 +
.markdown-body ol ol,
 +
.markdown-body ul ol {
 +
  list-style-type: lower-roman;
 +
}
 +
 +
.markdown-body ul ul ol,
 +
.markdown-body ul ol ol,
 +
.markdown-body ol ul ol,
 +
.markdown-body ol ol ol {
 +
  list-style-type: lower-alpha;
 +
}
 +
 +
.markdown-body dd {
 +
  margin-left: 0;
 +
}
 +
 +
.markdown-body code,
 +
.markdown-body pre,
 +
.markdown-body samp {
 +
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
 +
  font-size: 12px;
 +
}
 +
 +
.markdown-body pre {
 +
  margin-top: 0;
 +
  margin-bottom: 0;
 +
}
 +
 +
.markdown-body kbd {
 +
  background-color: #e7e7e7;
 +
  background-image: -moz-linear-gradient(#fefefe, #e7e7e7);
 +
  background-image: -webkit-linear-gradient(#fefefe, #e7e7e7);
 +
  background-image: linear-gradient(#fefefe, #e7e7e7);
 +
  background-repeat: repeat-x;
 +
  border-radius: 2px;
 +
  border: 1px solid #cfcfcf;
 +
  color: #000;
 +
  padding: 3px 5px;
 +
  line-height: 10px;
 +
  font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
 +
  display: inline-block;
 +
}
 +
 +
.markdown-body>*:first-child {
 +
  margin-top: 0 !important;
 +
}
 +
 +
.markdown-body>*:last-child {
 +
  margin-bottom: 0 !important;
 +
}
 +
 +
.markdown-body .headeranchor-link {
 +
  position: absolute;
 +
  top: 0;
 +
  bottom: 0;
 +
  left: 0;
 +
  display: block;
 +
  padding-right: 6px;
 +
  padding-left: 30px;
 +
  margin-left: -30px;
 +
}
 +
 +
.markdown-body .headeranchor-link:focus {
 +
  outline: none;
 +
}
 +
 +
.markdown-body h1,
 +
.markdown-body h2,
 +
.markdown-body h3,
 +
.markdown-body h4,
 +
.markdown-body h5,
 +
.markdown-body h6 {
 +
  position: relative;
 +
  margin-top: 1em;
 +
  margin-bottom: 16px;
 +
  font-weight: bold;
 +
  line-height: 1.4;
 +
}
 +
 +
.markdown-body h1 .headeranchor,
 +
.markdown-body h2 .headeranchor,
 +
.markdown-body h3 .headeranchor,
 +
.markdown-body h4 .headeranchor,
 +
.markdown-body h5 .headeranchor,
 +
.markdown-body h6 .headeranchor {
 +
  display: none;
 +
  color: #000;
 +
  vertical-align: middle;
 +
}
 +
 +
.markdown-body h1:hover .headeranchor-link,
 +
.markdown-body h2:hover .headeranchor-link,
 +
.markdown-body h3:hover .headeranchor-link,
 +
.markdown-body h4:hover .headeranchor-link,
 +
.markdown-body h5:hover .headeranchor-link,
 +
.markdown-body h6:hover .headeranchor-link {
 +
  height: 1em;
 +
  padding-left: 8px;
 +
  margin-left: -30px;
 +
  line-height: 1;
 +
  text-decoration: none;
 +
}
 +
 +
.markdown-body h1:hover .headeranchor-link .headeranchor,
 +
.markdown-body h2:hover .headeranchor-link .headeranchor,
 +
.markdown-body h3:hover .headeranchor-link .headeranchor,
 +
.markdown-body h4:hover .headeranchor-link .headeranchor,
 +
.markdown-body h5:hover .headeranchor-link .headeranchor,
 +
.markdown-body h6:hover .headeranchor-link .headeranchor {
 +
  display: inline-block;
 +
}
 +
 +
.markdown-body h1 {
 +
  padding-bottom: 0.3em;
 +
  font-size: 2.25em;
 +
  line-height: 1.2;
 +
  border-bottom: 1px solid #eee;
 +
}
 +
 +
.markdown-body h2 {
 +
  padding-bottom: 0.3em;
 +
  font-size: 1.75em;
 +
  line-height: 1.225;
 +
  border-bottom: 1px solid #eee;
 +
}
 +
 +
.markdown-body h3 {
 +
  font-size: 1.5em;
 +
  line-height: 1.43;
 +
}
 +
 +
.markdown-body h4 {
 +
  font-size: 1.25em;
 +
}
 +
 +
.markdown-body h5 {
 +
  font-size: 1em;
 +
}
 +
 +
.markdown-body h6 {
 +
  font-size: 1em;
 +
  color: #777;
 +
}
 +
 +
.markdown-body p,
 +
.markdown-body blockquote,
 +
.markdown-body ul,
 +
.markdown-body ol,
 +
.markdown-body dl,
 +
.markdown-body table,
 +
.markdown-body pre,
 +
.markdown-body .admonition {
 +
  margin-top: 0;
 +
  margin-bottom: 16px;
 +
}
 +
 +
.markdown-body hr {
 +
  height: 4px;
 +
  padding: 0;
 +
  margin: 16px 0;
 +
  background-color: #e7e7e7;
 +
  border: 0 none;
 +
}
 +
 +
.markdown-body ul,
 +
.markdown-body ol {
 +
  padding-left: 2em;
 +
}
 +
 +
.markdown-body ul ul,
 +
.markdown-body ul ol,
 +
.markdown-body ol ol,
 +
.markdown-body ol ul {
 +
  margin-top: 0;
 +
  margin-bottom: 0;
 +
}
 +
 +
.markdown-body li>p {
 +
  margin-top: 16px;
 +
}
 +
 +
.markdown-body dl {
 +
  padding: 0;
 +
}
 +
 +
.markdown-body dl dt {
 +
  padding: 0;
 +
  margin-top: 16px;
 +
  font-size: 1em;
 +
  font-style: italic;
 +
  font-weight: bold;
 +
}
 +
 +
.markdown-body dl dd {
 +
  padding: 0 16px;
 +
  margin-bottom: 16px;
 +
}
 +
 +
.markdown-body blockquote {
 +
  padding: 0 15px;
 +
  color: #777;
 +
  border-left: 4px solid #ddd;
 +
}
 +
 +
.markdown-body blockquote>:first-child {
 +
  margin-top: 0;
 +
}
 +
 +
.markdown-body blockquote>:last-child {
 +
  margin-bottom: 0;
 +
}
 +
 +
.markdown-body table {
 +
  display: block;
 +
  width: 100%;
 +
  overflow: auto;
 +
  word-break: normal;
 +
  word-break: keep-all;
 +
}
 +
 +
.markdown-body table th {
 +
  font-weight: bold;
 +
}
 +
 +
.markdown-body table th,
 +
.markdown-body table td {
 +
  padding: 6px 13px;
 +
  border: 1px solid #ddd;
 +
}
 +
 +
.markdown-body table tr {
 +
  background-color: #fff;
 +
  border-top: 1px solid #ccc;
 +
}
 +
 +
.markdown-body table tr:nth-child(2n) {
 +
  background-color: #f8f8f8;
 +
}
 +
 +
.markdown-body img {
 +
  max-width: 100%;
 +
  -moz-box-sizing: border-box;
 +
  box-sizing: border-box;
 +
}
 +
 +
.markdown-body code,
 +
.markdown-body samp {
 +
  padding: 0;
 +
  padding-top: 0.2em;
 +
  padding-bottom: 0.2em;
 +
  margin: 0;
 +
  font-size: 85%;
 +
  background-color: rgba(0,0,0,0.04);
 +
  border-radius: 3px;
 +
}
 +
 +
.markdown-body code:before,
 +
.markdown-body code:after {
 +
  letter-spacing: -0.2em;
 +
  content: "\00a0";
 +
}
 +
 +
.markdown-body pre>code {
 +
  padding: 0;
 +
  margin: 0;
 +
  font-size: 100%;
 +
  word-break: normal;
 +
  white-space: pre;
 +
  background: transparent;
 +
  border: 0;
 +
}
 +
 +
.markdown-body .codehilite {
 +
  margin-bottom: 16px;
 +
}
 +
 +
.markdown-body .codehilite pre,
 +
.markdown-body pre {
 +
  padding: 16px;
 +
  overflow: auto;
 +
  font-size: 85%;
 +
  line-height: 1.45;
 +
  background-color: #f7f7f7;
 +
  border-radius: 3px;
 +
}
 +
 +
.markdown-body .codehilite pre {
 +
  margin-bottom: 0;
 +
  word-break: normal;
 +
}
 +
 +
.markdown-body pre {
 +
  word-wrap: normal;
 +
}
 +
 +
.markdown-body pre code {
 +
  display: inline;
 +
  max-width: initial;
 +
  padding: 0;
 +
  margin: 0;
 +
  overflow: initial;
 +
  line-height: inherit;
 +
  word-wrap: normal;
 +
  background-color: transparent;
 +
  border: 0;
 +
}
 +
 +
.markdown-body pre code:before,
 +
.markdown-body pre code:after {
 +
  content: normal;
 +
}
 +
 +
/* Admonition */
 +
.markdown-body .admonition {
 +
  -webkit-border-radius: 3px;
 +
  -moz-border-radius: 3px;
 +
  position: relative;
 +
  border-radius: 3px;
 +
  border: 1px solid #e0e0e0;
 +
  border-left: 6px solid #333;
 +
  padding: 10px 10px 10px 30px;
 +
}
 +
 +
.markdown-body .admonition table {
 +
  color: #333;
 +
}
 +
 +
.markdown-body .admonition p {
 +
  padding: 0;
 +
}
 +
 +
.markdown-body .admonition-title {
 +
  font-weight: bold;
 +
  margin: 0;
 +
}
 +
 +
.markdown-body .admonition>.admonition-title {
 +
  color: #333;
 +
}
 +
 +
.markdown-body .attention>.admonition-title {
 +
  color: #a6d796;
 +
}
 +
 +
.markdown-body .caution>.admonition-title {
 +
  color: #d7a796;
 +
}
 +
 +
.markdown-body .hint>.admonition-title {
 +
  color: #96c6d7;
 +
}
 +
 +
.markdown-body .danger>.admonition-title {
 +
  color: #c25f77;
 +
}
 +
 +
.markdown-body .question>.admonition-title {
 +
  color: #96a6d7;
 +
}
 +
 +
.markdown-body .note>.admonition-title {
 +
  color: #d7c896;
 +
}
 +
 +
.markdown-body .admonition:before,
 +
.markdown-body .attention:before,
 +
.markdown-body .caution:before,
 +
.markdown-body .hint:before,
 +
.markdown-body .danger:before,
 +
.markdown-body .question:before,
 +
.markdown-body .note:before {
 +
  font: normal normal 16px fontawesome-mini;
 +
  -moz-osx-font-smoothing: grayscale;
 +
  -webkit-user-select: none;
 +
  -moz-user-select: none;
 +
  -ms-user-select: none;
 +
  user-select: none;
 +
  line-height: 1.5;
 +
  color: #333;
 +
  position: absolute;
 +
  left: 0;
 +
  top: 0;
 +
  padding-top: 10px;
 +
  padding-left: 10px;
 +
}
 +
 +
.markdown-body .admonition:before {
 +
  content: "\f056\00a0";
 +
  color: 333;
 +
}
 +
 +
.markdown-body .attention:before {
 +
  content: "\f058\00a0";
 +
  color: #a6d796;
 +
}
 +
 +
.markdown-body .caution:before {
 +
  content: "\f06a\00a0";
 +
  color: #d7a796;
 +
}
 +
 +
.markdown-body .hint:before {
 +
  content: "\f05a\00a0";
 +
  color: #96c6d7;
 +
}
 +
 +
.markdown-body .danger:before {
 +
  content: "\f057\00a0";
 +
  color: #c25f77;
 +
}
 +
 +
.markdown-body .question:before {
 +
  content: "\f059\00a0";
 +
  color: #96a6d7;
 +
}
 +
 +
.markdown-body .note:before {
 +
  content: "\f040\00a0";
 +
  color: #d7c896;
 +
}
 +
 +
.markdown-body .admonition::after {
 +
  content: normal;
 +
}
 +
 +
.markdown-body .attention {
 +
  border-left: 6px solid #a6d796;
 +
}
 +
 +
.markdown-body .caution {
 +
  border-left: 6px solid #d7a796;
 +
}
 +
 +
.markdown-body .hint {
 +
  border-left: 6px solid #96c6d7;
 +
}
 +
 +
.markdown-body .danger {
 +
  border-left: 6px solid #c25f77;
 +
}
 +
 +
.markdown-body .question {
 +
  border-left: 6px solid #96a6d7;
 +
}
 +
 +
.markdown-body .note {
 +
  border-left: 6px solid #d7c896;
 +
}
 +
 +
.markdown-body .admonition>*:first-child {
 +
  margin-top: 0 !important;
 +
}
 +
 +
.markdown-body .admonition>*:last-child {
 +
  margin-bottom: 0 !important;
 +
}
 +
 +
/* progress bar*/
 +
.markdown-body .progress {
 +
  display: block;
 +
  width: 300px;
 +
  margin: 10px 0;
 +
  height: 24px;
 +
  -webkit-border-radius: 3px;
 +
  -moz-border-radius: 3px;
 +
  border-radius: 3px;
 +
  background-color: #ededed;
 +
  position: relative;
 +
  box-shadow: inset -1px 1px 3px rgba(0, 0, 0, .1);
 +
}
 +
 +
.markdown-body .progress-label {
 +
  position: absolute;
 +
  text-align: center;
 +
  font-weight: bold;
 +
  width: 100%; margin: 0;
 +
  line-height: 24px;
 +
  color: #333;
 +
  text-shadow: 1px 1px 0 #fefefe, -1px -1px 0 #fefefe, -1px 1px 0 #fefefe, 1px -1px 0 #fefefe, 0 1px 0 #fefefe, 0 -1px 0 #fefefe, 1px 0 0 #fefefe, -1px 0 0 #fefefe, 1px 1px 2px #000;
 +
  -webkit-font-smoothing: antialiased !important;
 +
  white-space: nowrap;
 +
  overflow: hidden;
 +
}
 +
 +
.markdown-body .progress-bar {
 +
  height: 24px;
 +
  float: left;
 +
  -webkit-border-radius: 3px;
 +
  -moz-border-radius: 3px;
 +
  border-radius: 3px;
 +
  background-color: #96c6d7;
 +
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(0, 0, 0, .1);
 +
  background-size: 30px 30px;
 +
  background-image: -webkit-linear-gradient(
 +
    135deg, rgba(255, 255, 255, .4) 27%,
 +
    transparent 27%,
 +
    transparent 52%, rgba(255, 255, 255, .4) 52%,
 +
    rgba(255, 255, 255, .4) 77%,
 +
    transparent 77%, transparent
 +
  );
 +
  background-image: -moz-linear-gradient(
 +
    135deg,
 +
    rgba(255, 255, 255, .4) 27%, transparent 27%,
 +
    transparent 52%, rgba(255, 255, 255, .4) 52%,
 +
    rgba(255, 255, 255, .4) 77%, transparent 77%,
 +
    transparent
 +
  );
 +
  background-image: -ms-linear-gradient(
 +
    135deg,
 +
    rgba(255, 255, 255, .4) 27%, transparent 27%,
 +
    transparent 52%, rgba(255, 255, 255, .4) 52%,
 +
    rgba(255, 255, 255, .4) 77%, transparent 77%,
 +
    transparent
 +
  );
 +
  background-image: -o-linear-gradient(
 +
    135deg,
 +
    rgba(255, 255, 255, .4) 27%, transparent 27%,
 +
    transparent 52%, rgba(255, 255, 255, .4) 52%,
 +
    rgba(255, 255, 255, .4) 77%, transparent 77%,
 +
    transparent
 +
  );
 +
  background-image: linear-gradient(
 +
    135deg,
 +
    rgba(255, 255, 255, .4) 27%, transparent 27%,
 +
    transparent 52%, rgba(255, 255, 255, .4) 52%,
 +
    rgba(255, 255, 255, .4) 77%, transparent 77%,
 +
    transparent
 +
  );
 +
}
 +
 +
.markdown-body .progress-100plus .progress-bar {
 +
  background-color: #a6d796;
 +
}
 +
 +
.markdown-body .progress-80plus .progress-bar {
 +
  background-color: #c6d796;
 +
}
 +
 +
.markdown-body .progress-60plus .progress-bar {
 +
  background-color: #d7c896;
 +
}
 +
 +
.markdown-body .progress-40plus .progress-bar {
 +
  background-color: #d7a796;
 +
}
 +
 +
.markdown-body .progress-20plus .progress-bar {
 +
  background-color: #d796a6;
 +
}
 +
 +
.markdown-body .progress-0plus .progress-bar {
 +
  background-color: #c25f77;
 +
}
 +
 +
.markdown-body .candystripe-animate .progress-bar{
 +
  -webkit-animation: animate-stripes 3s linear infinite;
 +
  -moz-animation: animate-stripes 3s linear infinite;
 +
  animation: animate-stripes 3s linear infinite;
 +
}
 +
 +
@-webkit-keyframes animate-stripes {
 +
  0% {
 +
    background-position: 0 0;
 +
  }
 +
 +
  100% {
 +
    background-position: 60px 0;
 +
  }
 +
}
 +
 +
@-moz-keyframes animate-stripes {
 +
  0% {
 +
    background-position: 0 0;
 +
  }
 +
 +
  100% {
 +
    background-position: 60px 0;
 +
  }
 +
}
 +
 +
@keyframes animate-stripes {
 +
  0% {
 +
    background-position: 0 0;
 +
  }
 +
 +
  100% {
 +
    background-position: 60px 0;
 +
  }
 +
}
 +
 +
.markdown-body .gloss .progress-bar {
 +
  box-shadow:
 +
    inset 0 4px 12px rgba(255, 255, 255, .7),
 +
    inset 0 -12px 0 rgba(0, 0, 0, .05);
 +
}
 +
 +
/* Multimarkdown Critic Blocks */
 +
.markdown-body .critic_mark {
 +
  background: #ff0;
 +
}
 +
 +
.markdown-body .critic_delete {
 +
  color: #c82829;
 +
  text-decoration: line-through;
 +
}
 +
 +
.markdown-body .critic_insert {
 +
  color: #718c00 ;
 +
  text-decoration: underline;
 +
}
 +
 +
.markdown-body .critic_comment {
 +
  color: #8e908c;
 +
  font-style: italic;
 +
}
 +
 +
.markdown-body .headeranchor {
 +
  font: normal normal 16px octicons-anchor;
 +
  line-height: 1;
 +
  display: inline-block;
 +
  text-decoration: none;
 +
  -webkit-font-smoothing: antialiased;
 +
  -moz-osx-font-smoothing: grayscale;
 +
  -webkit-user-select: none;
 +
  -moz-user-select: none;
 +
  -ms-user-select: none;
 +
  user-select: none;
 +
}
 +
 +
.headeranchor:before {
 +
  content: '\f05c';
 +
}
 +
 +
.markdown-body .task-list-item {
 +
  list-style-type: none;
 +
}
 +
 +
.markdown-body .task-list-item+.task-list-item {
 +
  margin-top: 3px;
 +
}
 +
 +
.markdown-body .task-list-item input {
 +
  margin: 0 4px 0.25em -20px;
 +
  vertical-align: middle;
 +
}
 +
 +
/* Media */
 +
@media only screen and (min-width: 480px) {
 +
  .markdown-body {
 +
    font-size:14px;
 +
  }
 +
}
 +
 +
@media only screen and (min-width: 768px) {
 +
  .markdown-body {
 +
    font-size:16px;
 +
  }
 +
}
 +
 +
@media print {
 +
  .markdown-body * {
 +
    background: transparent !important;
 +
    color: black !important;
 +
    filter:none !important;
 +
    -ms-filter: none !important;
 +
  }
 +
 +
  .markdown-body {
 +
    font-size:12pt;
 +
    max-width:100%;
 +
    outline:none;
 +
    border: 0;
 +
  }
 +
 +
  .markdown-body a,
 +
  .markdown-body a:visited {
 +
    text-decoration: underline;
 +
  }
 +
 +
  .markdown-body .headeranchor-link {
 +
    display: none;
 +
  }
 +
 +
  .markdown-body a[href]:after {
 +
    content: " (" attr(href) ")";
 +
  }
 +
 +
  .markdown-body abbr[title]:after {
 +
    content: " (" attr(title) ")";
 +
  }
 +
 +
  .markdown-body .ir a:after,
 +
  .markdown-body a[href^="javascript:"]:after,
 +
  .markdown-body a[href^="#"]:after {
 +
    content: "";
 +
  }
 +
 +
  .markdown-body pre {
 +
    white-space: pre;
 +
    white-space: pre-wrap;
 +
    word-wrap: break-word;
 +
  }
 +
 +
  .markdown-body pre,
 +
  .markdown-body blockquote {
 +
    border: 1px solid #999;
 +
    padding-right: 1em;
 +
    page-break-inside: avoid;
 +
  }
 +
 +
  .markdown-body .progress,
 +
  .markdown-body .progress-bar {
 +
    -moz-box-shadow: none;
 +
    -webkit-box-shadow: none;
 +
    box-shadow: none;
 +
  }
 +
 +
  .markdown-body .progress {
 +
    border: 1px solid #ddd;
 +
  }
 +
 +
  .markdown-body .progress-bar {
 +
    height: 22px;
 +
    border-right: 1px solid #ddd;
 +
  }
 +
 +
  .markdown-body tr,
 +
  .markdown-body img {
 +
    page-break-inside: avoid;
 +
  }
 +
 +
  .markdown-body img {
 +
    max-width: 100% !important;
 +
  }
 +
 +
  .markdown-body p,
 +
  .markdown-body h2,
 +
  .markdown-body h3 {
 +
    orphans: 3;
 +
    widows: 3;
 +
  }
 +
 +
  .markdown-body h2,
 +
  .markdown-body h3 {
 +
    page-break-after: avoid;
 +
  }
 +
}
 
     html {
 
     html {
 
         overflow-x: hidden;
 
         overflow-x: hidden;

Revision as of 16:35, 1 November 2017

Team

Biohub 2.0 is an open-source project and allow anyone to do anything with it, as long as not to break GPL 3.0 license. Since it has been developed, tested and deployed on Ubuntu 16.04, we recommend you to use similar operating system to avoid possible problems.

System Requirements

  • python >= 3.5. Related packages: python3, python3.5-dev. (libbz2-dev, zlib1g-dev are required if you compile python from source code).
  • mysql >= 5.7. Related packages: mysql-server, mysql-client, libmysqlclient.
  • redis. Related packages: redis-server.
  • jre. Related packages: default-jre.
  • elasticsearch < 3. Can be downloaded via: https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.4.6/elasticsearch-2.4.6.deb
  • nodejs >= 6. Related packages: nodejs.

Clone and Init the Environment

To clone down Biohub 2.0, simply run:

$ git clone https://github.com/igemsoftware2017/USTC-Software-2017
$ cd USTC-Software-2017
$ git submodule update --init --recursive

We recommend to use virtual environment to manage python dependencies:

$ python3 -m venv .env
$ source .env/bin/activate
(.env) $ pip install -r requirements/dev.txt

Setting up the server

The main configuration file should lie at ~/config.json. You can finish it with the help of ~/config.json.example:

{
    "DATABASE": {
        "NAME": "",     // database name
        "USER": "",     // database username
        "PASSWORD": "", // database password
        "HOST": "",     // database host, here should be "localhost"
        "PORT": 3306,   // database port
        "TEST": {       // test database
            "NAME": "",
            "CHARSET": "utf8",
            "COLLATION": null,
            "MIRROR": null
        }
    },
    "PLUGINS": [        // list of installed plugins
        "biohub.abacus",
        "biohub.biocircuit",
        "biohub.biomap"
    ],
    "TIMEZONE": "UTC",
    "UPLOAD_DIR": "",   // path to directory where uploaded files are placed
    "REDIS_URI": "",    // redis connection URL. format "redis://<username>:<password>@<host>:6379"
    "SECRET_KEY": "",   // secret key of the site
    "MAX_TASKS": 20,    // the maximum number of tasks can be executed at a time
    "TASK_MAX_TIMEOUT": 180,  // the maximum seconds a task can be executed
    "ES_URL": "http://127.0.0.1:9200/", // the connection URL of ElasticSearch
    "EMAIL": {          // email configuration
        "HOST_PASSWORD": "",
        "HOST_USER": "",
        "HOST": "",
        "PORT": 465
    },
    "CORS": [],         // authenticated domains. fill the field if cross-domain issues occur during debugging
    "THROTTLE": {       // throttle configuration for each modules
        "rate": 15,
        "experience": 86400,
        "post": 15,
        "vote": 15,
        "register": 3600
    }
}

Then run ./biohub-cli.py init to initialize the database. This step may take several minutes as it will download and preprocess the initial data. After that you can run ./biohub-cli.py runserver to test if the server can be normally started.

About ABACUS

The integrated plugin ABACUS is actually constituted by two parts: the executable, written in Java and not hosted on Github, and the caller, written in Python and located in biohub/abacus/. Due to some technical reasons, we cannot provide the executable. If you want to test ABACUS locally, you may use one of our remote servers by writing the following content to biohub/abacus/config.json:

{
    "ABACUS_REMOTE_SERVERS": [
        "http://106.15.205.191/"
    ]
}

Setting up the frontend

The frontend of Biohub 2.0 lies in frontend/main. Firstly you should install the dependencies:

$ cd frontend/main
$ npm install

During developing, Biohub 2.0 uses webpack-dev-server for hot-reloading. You should configure the proxies in frontend/main/domain.config.json to make it work properly. As above, an example file is available:

{
    "dev": {
        // during developing, plugins and the main frontend are compiled and served separately
        // the following field maps each plugin to a port where its frontend files served
        // to serve a plugin frontend files, run `npm run dev <port>` in its frontend directory
        "plugins": {
            "biohub.abacus": 10000,
            "biohub.biocircuit": 10001,
            "biohub.biomap": 10002
        },
        // the address to your local developing server
        "proxy_domain": "localhost:8000"
    },
    // configuration for production environment
    // you can simply ignore it
    "prod": {
        "domain": "biohub.technology",
        "static": "https://ustc-software2017-frontend.github.io/Biohub-frontend/dist/assets/"
    }
}

Then run npm run dev, and you can access the site at localhost:8080.

Guidance for Plugin Developers

To create and activate a new plugin, simply run:

(.env) $ ./biohub-cli.py plugin new <plugin_name> --with-frontend
(.env) $ ./biohub-cli.py plugin install <plugin_name>

where <plugin_name> is the dot-separated module name of the plugin (e.g. biohub.abacus). You may type ./biohub-cli.py plugin new --help to find more details.

The second step is to install dependencies for the frontend of the new plugin. Simply run:

(.env) $ cd path/to/your/plugin/frontend
(.env) $ npm install
(.env) $ npm run dev <port>  # randomly choose a number for <port> from 10000~65535

Then compiled files will be served at localhost:<port>. Don’t forget to add a new item in frontend/main/domain.config.json:

{
    "dev": {
        // ...
        plugins: {
            // ...
            "<your_plugin_name>": "<port>"
        }
    }
}

Now you can start to write your own plugin. The templates generated by biohub-cli contains some useful comments, which may help you during developing. Also, you can take our integrated plugins (e.g. biohub.biomap) as references.