59 lines
3.0 KiB
Vue
59 lines
3.0 KiB
Vue
<template>
|
||
<div>
|
||
<div class="md-content" data-md-component="content">
|
||
<article class="md-content__inner md-typeset">
|
||
<h1 id="_1">学术资源加速<a class="headerlink" href="#_1" title="Permanent link">¶</a></h1>
|
||
<h2 id="_2">公开服务<a class="headerlink" href="#_2" title="Permanent link">¶</a></h2>
|
||
<p>点击访问网址,站点内有具体教程。</p>
|
||
<p>Github: <a href="https://ghproxy.link/" target="_blank">https://ghproxy.link/</a>
|
||
(点击后查看当前可用的域名地址,然后点击地址跳转查看文档)</p>
|
||
<p>HuggingFace镜像站:<a href="https://hf-mirror.com/" target="_blank">https://hf-mirror.com/</a></p>
|
||
<h2 id="autodl">AutoDL内置服务<a class="headerlink" href="#autodl" title="Permanent link">¶</a></h2>
|
||
<blockquote>
|
||
<p>声明:限于学术使用github和huggingface网络速度慢的问题,以下为方便用户学术用途使用相关资源提供的加速代理,不承诺稳定性保证。此外如遭遇恶意攻击等,将随时停止该加速服务</p>
|
||
</blockquote>
|
||
<p>以下为可以加速访问的学术资源地址:</p>
|
||
<ul>
|
||
<li>github.com</li>
|
||
<li>githubusercontent.com</li>
|
||
<li>githubassets.com</li>
|
||
<li>huggingface.co</li>
|
||
</ul>
|
||
<p>如果在终端中使用:</p>
|
||
<div class="highlight">
|
||
<pre><span></span><code>source /etc/network_turbo
|
||
</code></pre>
|
||
</div>
|
||
<p>如果是在Notebook中使用:</p>
|
||
<div class="highlight">
|
||
<pre><span></span><code tabindex="0">import subprocess
|
||
import os
|
||
|
||
result = subprocess.run('bash -c "source /etc/network_turbo && env | grep proxy"', shell=True, capture_output=True, text=True)
|
||
output = result.stdout
|
||
for line in output.splitlines():
|
||
if '=' in line:
|
||
var, value = line.split('=', 1)
|
||
os.environ[var] = value
|
||
</code></pre>
|
||
</div>
|
||
<p><strong>取消学术加速</strong>,如果不再需要建议关闭学术加速,因为该加速可能对正常网络造成一定影响。</p>
|
||
<div class="highlight">
|
||
<pre><span></span><code>unset http_proxy && unset https_proxy
|
||
</code></pre>
|
||
</div>
|
||
<h3 id="_3">速度对比<a class="headerlink" href="#_3" title="Permanent link">¶</a></h3>
|
||
<p>未使用加速:</p>
|
||
<p><img alt="image-20220902184957292" src="../Untitled.assets/image-20220902184957292.png"></p>
|
||
<p>使用加速:</p>
|
||
<p><img alt="image-20220902185038755" src="../Untitled.assets/image-20220902185038755.png"></p>
|
||
|
||
</article>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
|
||
<style scoped>
|
||
|
||
</style> |