mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-08 17:42:21 +00:00
Add doc about how to use the CPU-only docker images (#1432)
This commit is contained in:
parent
ddd7131317
commit
835a92eba5
@ -20,7 +20,11 @@ We describe the following items in this section:
|
|||||||
View available tags
|
View available tags
|
||||||
===================
|
===================
|
||||||
|
|
||||||
You can use the following command to view available tags:
|
CUDA-enabled docker images
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
You can use the following command to view available tags for CUDA-enabled
|
||||||
|
docker images:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -43,8 +47,25 @@ which will give you something like below:
|
|||||||
|
|
||||||
Please select an appropriate combination of `torch`_ and CUDA.
|
Please select an appropriate combination of `torch`_ and CUDA.
|
||||||
|
|
||||||
Download a docker image
|
CPU-only docker images
|
||||||
=======================
|
----------------------
|
||||||
|
|
||||||
|
To view CPU-only docker images, please visit `<https://github.com/k2-fsa/icefall/pkgs/container/icefall>`_
|
||||||
|
for available tags.
|
||||||
|
|
||||||
|
You can select different combinations of ``Python`` and ``torch``. For instance,
|
||||||
|
to select ``Python 3.8`` and ``torch 2.1.2``, you can use the following tag
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
cpu-py3.8-torch2.1.2-v1.1
|
||||||
|
|
||||||
|
where ``v1.1`` is the current version of the docker image. You may see
|
||||||
|
``ghcr.io/k2-fsa/icefall:cpu-py3.8-torch2.1.2-v1.2`` or some other versions.
|
||||||
|
We recommend that you always use the latest version.
|
||||||
|
|
||||||
|
Download a docker image (CUDA)
|
||||||
|
==============================
|
||||||
|
|
||||||
Suppose that you select the tag ``torch1.13.0-cuda11.6``, you can use
|
Suppose that you select the tag ``torch1.13.0-cuda11.6``, you can use
|
||||||
the following command to download it:
|
the following command to download it:
|
||||||
@ -53,6 +74,16 @@ the following command to download it:
|
|||||||
|
|
||||||
sudo docker image pull k2fsa/icefall:torch1.13.0-cuda11.6
|
sudo docker image pull k2fsa/icefall:torch1.13.0-cuda11.6
|
||||||
|
|
||||||
|
Download a docker image (CPU)
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Suppose that you select the tag ``cpu-py3.8-torch2.1.2-v1.1``, you can use
|
||||||
|
the following command to download it:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sudo docker pull ghcr.io/k2-fsa/icefall:cpu-py3.8-torch2.1.2-v1.1
|
||||||
|
|
||||||
Run a docker image with GPU
|
Run a docker image with GPU
|
||||||
===========================
|
===========================
|
||||||
|
|
||||||
@ -65,7 +96,7 @@ Run a docker image with CPU
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sudo docker run --rm -it k2fsa/icefall:torch1.13.0-cuda11.6 /bin/bash
|
sudo docker run --rm -it ghcr.io/k2-fsa/icefall:cpu-py3.8-torch2.1.2-v1.1 /bin/bash
|
||||||
|
|
||||||
Run yesno within a docker container
|
Run yesno within a docker container
|
||||||
===================================
|
===================================
|
||||||
@ -74,8 +105,13 @@ After starting the container, the following interface is presented:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# GPU-enabled docker
|
||||||
root@60c947eac59c:/workspace/icefall#
|
root@60c947eac59c:/workspace/icefall#
|
||||||
|
|
||||||
|
# CPU-only docker
|
||||||
|
root@60c947eac59c:# mkdir /workspace; git clone https://github.com/k2-fsa/icefall
|
||||||
|
root@60c947eac59c:# export PYTHONPATH=/workspace/icefall:$PYTHONPATH
|
||||||
|
|
||||||
It shows the current user is ``root`` and the current working directory
|
It shows the current user is ``root`` and the current working directory
|
||||||
is ``/workspace/icefall``.
|
is ``/workspace/icefall``.
|
||||||
|
|
||||||
@ -107,7 +143,7 @@ to switch to the ``yesno`` recipe and run
|
|||||||
|
|
||||||
.. hint::
|
.. hint::
|
||||||
|
|
||||||
If you are running without GPU, it may report the following error:
|
If you are running without GPU with a GPU-enabled docker, it may report the following error:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user