merge master

This commit is contained in:
bigeagle 2016-11-13 16:31:42 +08:00
commit ac309786df
10 changed files with 141 additions and 12 deletions

View File

@ -30,4 +30,7 @@ gems:
exclude: [Gemfile, Gemfile.lock, README.md, gen_robot.sh, vendor]
# Content Related
new_mirrors: [arch4edu, ros, elvish, HHVM, steamos, bjlx, loongson, tensorflow, elastic]
new_mirrors: [arch4edu, ros, elvish, HHVM, steamos, bjlx, loongson, tensorflow, elasticstack]
descriptions:
AOSP: 'Android Open Source Project'

View File

@ -14,6 +14,7 @@
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/bootstrap.min.js"></script>
<script src="/static/js/bootstrap-select.min.js"></script>
<script src="/static/js/vue.min.js"></script>
<script src="/static/js/markup.min.js"></script>
<script src="/static/js/webfont.js"></script>
</head>

View File

@ -17,9 +17,9 @@ sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
<div class="form-group">
<label>选择你的 CentOS 版本: </label>
<select class="form-control release-select" data-template="#repo-template" data-target="#repo-content">
<option data-release="5" selected>CentOS 5</option>
<option data-release="5">CentOS 5</option>
<option data-release="6">CentOS 6</option>
<option data-release="7">CentOS 7</option>
<option data-release="7" selected>CentOS 7</option>
</select>
</div>
</form>
@ -45,7 +45,6 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}}
#released updates
[updates]
name=CentOS-$releasever - Updates
@ -61,7 +60,6 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}}
{{if release_name|equals>5}}
#packages used/produced in the build but not released
[addons]
@ -79,7 +77,6 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$base
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}}
{{if release_name|between>5>6}}
#contrib - packages by Centos Users
[contrib]
@ -88,9 +85,7 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/contrib/$basearc
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}}
{{/if}}
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}}{{/if}}
</script>
{% endraw %}

View File

@ -0,0 +1,95 @@
---
category: help
layout: help
mirrorid: tensorflow
---
# TensorFlow 镜像使用帮助
请先安装 python 环境,科学计算用途建议安装 [anaconda](/help/anaconda/)。
TensorFlow 安装方法请参考 <https://www.tensorflow.org/get_started>,把 `https://storage.googleapis.com/` 替换为 `https://mirrors.tuna.tsinghua.edu.cn/`
即可。
或直接运行下列命令,一步完成整个安装过程。
{% raw %}
<div id="content-form">
<form class="form-inline">
<div class="form-group">
<label>计算单元: </label>
<select v-model="form.xpu" class="form-control">
<option value="gpu">GPU</option>
<option value="cpu">CPU</option>
</select>
<label>操作系统: </label>
<select v-model="form.os" class="form-control">
<option value="linux">Linux</option>
<option value="mac">Mac OS X</option>
</select>
<label>Python 版本: </label>
<select v-model="form.python" class="form-control">
<template v-if="form.os === 'linux'">
<option value="35">3.5</option>
<option value="34">3.4</option>
<option value="27">2.7</option>
</template>
<template v-if="form.os == 'mac'">
<option value="3">3</option>
<option value="2">2</option>
</template>
</select>
<label>TensorFlow 版本: </label>
<select v-model="form.tfver" class="form-control">
<option value="0.11.0">0.11.0</option>
<option value="0.10.0">0.10.0</option>
</select>
</div>
</form>
<p></p>
<pre>
pip install \
-i https://pypi.tuna.tsinghua.edu.cn/simple/ \
https://mirrors.tuna.tsinghua.edu.cn/tensorflow/{{form.os}}/{{form.xpu}}/tensorflow-{{form.tfver}}-{{pytag}}.whl
</pre>
</div>
<script>
var vue = new Vue({
el: "#content-form",
data: {
form: {
xpu: "gpu",
os: "linux",
python: "35",
tfver: "0.11.0"
}
},
computed: {
pytag: function() {
if (this.form.os === "linux") {
if (this.form.python === "27") {
return "cp" + this.form.python + "-none-linux_x86_64";
}
return "cp" + this.form.python + "-cp"+this.form.python+"m-linux_x86_64";
} else if (this.form.os === "mac") {
return "py" + this.form.python + "-none-any";
}
}
},
watch: {
"form.os": function (newOS) {
if (newOS === "linux") {
this.form.python = "35";
} else if (newOS === "mac") {
this.form.python = "3";
}
}
}
});
</script>
{% endraw %}

View File

@ -0,0 +1,18 @@
---
category: news
layout: news
title: "新增 Tensorflow 等一系列镜像"
author: Xavier Yao & Harry Chen
---
TUNA 镜像站新增一系列镜像。
- tensorflow: Google 开发的、采用数据流图data flow graphs、用于数值计算的开源软件库被广泛应用于深度学习等领域。使用方法见 [TensorFlow 镜像使用帮助](/help/tensorflow/)。
- arch4edu: 用于 ArchLinux 的一系列科研、教学所需工具
- ros: 用于开发机器人的工具包
- elvish: TUNA 前会长 [xiaq](https://github.com/xiaq) 开发的革命性 Shell ,详见 [这里](https://elvish.io/)
- HHVM: 由 Facebook 开发的高性能 PHP 虚拟机
- steamos: 不解释,剁手专用
- bjlx: [北京龙芯 & Debian 俱乐部](http://www.bjlx.org.cn/) 的公开源
- loongson: 用于龙芯电脑的软件包
- elasticstack: ELK 系列数据分析工具5.x 之后改名为 elastic stack

View File

@ -106,7 +106,7 @@ permalink: /
{{if is_master}}
<tr class="status-{{status}} row">
<td class="col-md-8">
<a href="{{if url}}{{url}}{{else}}/{{name}}{{/if}}">{{name}}</a>
<a class="mirror-item-label" data-toggle="popover" data-trigger="hover" data-placement="right" data-content="{{if description}}{{description}}{{/if}}" href="{{if url}}{{url}}{{else}}/{{name}}{{/if}}">{{name}}</a>
{{if is_new}}<span class="label label-new">new</span>{{/if}}
{{if help_url}}<a href="{{help_url}}"><i class="fa fa-question-circle" title="Help"></i></a>{{/if}}
</td>

View File

@ -125,6 +125,9 @@ $font_local: 'Heiti SC', 'Hiragino Sans GB', 'STHeiti', 'Source Han Sans CN', 'W
color: $color_grey;
}
}
.fa-user {
font-family: #{$font_default}, 'FontAwesome';
}
}
/* Footer */

View File

@ -33,7 +33,6 @@ $(document).ready(() => {
let help_url = $(ev.target).find("option:selected").data('help-url');
window.location = `${window.location.protocol}//${window.location.host}${help_url}`;
});
});
// vim: ts=2 sts=2 sw=2 noexpandtab

View File

@ -23,6 +23,7 @@ var mir_tmpl = $("#template").text(),
new_mirrors = {
{% for n in site.new_mirrors %}"{{n}}": true{% if forloop.index < forloop.length %},{% endif %}{% endfor %}
},
unlisted = [
{
'status': 'success',
@ -39,7 +40,10 @@ var mir_tmpl = $("#template").text(),
'homebrew': {
'url': "/help/homebrew/",
}
};
},
descriptions = {
{% for item in site.descriptions %}{{ item[0] }}: '{{ item[1] }}' {% endfor %}
}
window.refreshMirrorList = () => {
$.getJSON("/static/tunasync.json", (status_data) => {
@ -58,6 +62,7 @@ window.refreshMirrorList = () => {
d.label = label_map[d.status];
d.help_url = help_url[d.name];
d.is_new = new_mirrors[d.name];
d.description = descriptions[d.name];
d.show_status = (d.status != "success");
if (d.is_master === undefined) {
d.is_master = true;
@ -78,6 +83,8 @@ window.refreshMirrorList = () => {
}
var result = Mark.up(mir_tmpl, {mirrors: mirrors});
$('#mirror-list').html(result);
$('.mirror-item-label').popover();
});
setTimeout(refreshMirrorList, 10000);
}

8
static/js/vue.min.js vendored Normal file

File diff suppressed because one or more lines are too long