Skip to content

Commit 657c404

Browse files
authored
Doc: Add huggingface mirror for users from China (#1272)
1 parent 7d8f541 commit 657c404

File tree

7 files changed

+40
-0
lines changed

7 files changed

+40
-0
lines changed

.github/workflows/build-doc.yml

+2
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ jobs:
121121
make html
122122
cp -v source/cpu.html ./build/html/
123123
cp -v source/cuda.html ./build/html/
124+
cp -v source/cpu-cn.html ./build/html/
125+
cp -v source/cuda-cn.html ./build/html/
124126
touch build/html/.nojekyll
125127
126128
- name: Deploy

docs/source/.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cpu.html
2+
cpu-cn.html
3+
cuda.html
4+
cuda-cn.html

docs/source/installation/from_wheels.rst

+30
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,21 @@ we can use one of the following methods:
4242
4343
# method 2
4444
pip install torch==2.0.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
45+
4546
wget https://huggingface.co/csukuangfj/k2/resolve/main/cpu/k2-1.24.3.dev20230719+cpu.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
47+
48+
# For users from China
49+
# 中国国内用户,如果访问不了 huggingface, 请使用
50+
# wget https://hf-mirror.com/csukuangfj/k2/resolve/main/cpu/k2-1.24.3.dev20230719+cpu.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
51+
4652
pip install ./k2-1.24.3.dev20230719+cpu.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
4753
4854
.. hint::
4955

5056
You can visit `<https://k2-fsa.github.io/k2/cpu.html>`_ to see avaiable versions of `k2`_.
5157

58+
For users from China, please visit `<https://k2-fsa.github.io/k2/cpu-cn.html>`_ to see avaiable versions of `k2`_.
59+
5260

5361
macOS (CPU) example
5462
^^^^^^^^^^^^^^^^^^^
@@ -70,12 +78,19 @@ we can use the following methods:
7078
# method 2
7179
pip install torch==2.0.1
7280
wget https://huggingface.co/csukuangfj/k2/resolve/main/macos/k2-1.24.3.dev20230720+cpu.torch2.0.1-cp38-cp38-macosx_10_9_x86_64.whl
81+
82+
# For users from China
83+
# 中国国内用户,如果访问不了 huggingface, 请使用
84+
# wget https://hf-mirror.com/csukuangfj/k2/resolve/main/macos/k2-1.24.3.dev20230720+cpu.torch2.0.1-cp38-cp38-macosx_10_9_x86_64.whl
85+
7386
pip install ./k2-1.24.3.dev20230720+cpu.torch2.0.1-cp38-cp38-macosx_10_9_x86_64.whl
7487
7588
.. hint::
7689

7790
You can visit `<https://k2-fsa.github.io/k2/cpu.html>`_ to see avaiable versions of `k2`_.
7891

92+
For users from China, please visit `<https://k2-fsa.github.io/k2/cpu-cn.html>`_ to see avaiable versions of `k2`_.
93+
7994
Windows (CPU) example
8095
^^^^^^^^^^^^^^^^^^^^^
8196

@@ -96,6 +111,11 @@ we can use the one of the following methods:
96111
# method 2
97112
pip install torch==2.0.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
98113
wget https://huggingface.co/csukuangfj/k2/resolve/main/windows-cpu/k2-1.24.3.dev20230726+cpu.torch2.0.1-cp38-cp38-win_amd64.whl
114+
115+
# For users from China
116+
# 中国国内用户,如果访问不了 huggingface, 请使用
117+
# wget https://hf-mirror.com/csukuangfj/k2/resolve/main/windows-cpu/k2-1.24.3.dev20230726+cpu.torch2.0.1-cp38-cp38-win_amd64.whl
118+
99119
pip install k2-1.24.3.dev20230726+cpu.torch2.0.1-cp38-cp38-win_amd64.whl
100120
101121
.. hint::
@@ -107,6 +127,8 @@ we can use the one of the following methods:
107127

108128
You can visit `<https://k2-fsa.github.io/k2/cpu.html>`_ to see avaiable versions of `k2`_.
109129

130+
For users from China, please visit `<https://k2-fsa.github.io/k2/cpu-cn.html>`_ to see avaiable versions of `k2`_.
131+
110132
Linux (CUDA) example
111133
^^^^^^^^^^^^^^^^^^^^
112134

@@ -126,9 +148,17 @@ we can use the following methods:
126148
127149
# method 2
128150
pip install torch==2.0.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html
151+
129152
wget https://huggingface.co/csukuangfj/k2/resolve/main/cuda/k2-1.24.3.dev20230718+cuda11.7.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
153+
154+
# For users from China
155+
# 中国国内用户,如果访问不了 huggingface, 请使用
156+
# wget https://hf-mirror.com/csukuangfj/k2/resolve/main/cuda/k2-1.24.3.dev20230718+cuda11.7.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
157+
130158
pip install ./k2-1.24.3.dev20230718+cuda11.7.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
131159
132160
.. hint::
133161

134162
You can visit `<https://k2-fsa.github.io/k2/cuda.html>`_ to see avaiable versions of `k2`_.
163+
164+
For users from China, please visit `<https://k2-fsa.github.io/k2/cuda-cn.html>`_ to see avaiable versions of `k2`_.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.rst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.rst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.rst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.rst

0 commit comments

Comments
 (0)