Skip to content

Commit

Permalink
Doc: Add huggingface mirror for users from China (#1272)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Mar 21, 2024
1 parent 7d8f541 commit 657c404
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ jobs:
make html
cp -v source/cpu.html ./build/html/
cp -v source/cuda.html ./build/html/
cp -v source/cpu-cn.html ./build/html/
cp -v source/cuda-cn.html ./build/html/
touch build/html/.nojekyll
- name: Deploy
Expand Down
4 changes: 4 additions & 0 deletions docs/source/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cpu.html
cpu-cn.html
cuda.html
cuda-cn.html
30 changes: 30 additions & 0 deletions docs/source/installation/from_wheels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,21 @@ we can use one of the following methods:
# method 2
pip install torch==2.0.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
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
# For users from China
# 中国国内用户,如果访问不了 huggingface, 请使用
# 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
pip install ./k2-1.24.3.dev20230719+cpu.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.. hint::

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

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


macOS (CPU) example
^^^^^^^^^^^^^^^^^^^
Expand All @@ -70,12 +78,19 @@ we can use the following methods:
# method 2
pip install torch==2.0.1
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
# For users from China
# 中国国内用户,如果访问不了 huggingface, 请使用
# 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
pip install ./k2-1.24.3.dev20230720+cpu.torch2.0.1-cp38-cp38-macosx_10_9_x86_64.whl
.. hint::

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

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

Windows (CPU) example
^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -96,6 +111,11 @@ we can use the one of the following methods:
# method 2
pip install torch==2.0.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
wget https://huggingface.co/csukuangfj/k2/resolve/main/windows-cpu/k2-1.24.3.dev20230726+cpu.torch2.0.1-cp38-cp38-win_amd64.whl
# For users from China
# 中国国内用户,如果访问不了 huggingface, 请使用
# 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
pip install k2-1.24.3.dev20230726+cpu.torch2.0.1-cp38-cp38-win_amd64.whl
.. hint::
Expand All @@ -107,6 +127,8 @@ we can use the one of the following methods:

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

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

Linux (CUDA) example
^^^^^^^^^^^^^^^^^^^^

Expand All @@ -126,9 +148,17 @@ we can use the following methods:
# method 2
pip install torch==2.0.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html
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
# For users from China
# 中国国内用户,如果访问不了 huggingface, 请使用
# 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
pip install ./k2-1.24.3.dev20230718+cuda11.7.torch2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.. hint::

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

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

0 comments on commit 657c404

Please sign in to comment.