Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. (Optional) Configure the virtual environment if needed.
    pip install virtualenv
    virtualenv Horovod
    source Horovod/bin/activate
  3. Go to the installation directory.
    cd /path/to/HOROVOD
  4. Install TensorFlow.
    pip install tensorflow-2.4.1-cp37-cp37m-manylinux_2_24_aarch64.whl --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple
  5. Update NumPy.
    pip install -U numpy  --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple
    python3 -c "import tensorflow as tf; print(tf.__version__); print(tf.sysconfig.get_include()); print(' '.join(tf.sysconfig.get_link_flags())); print(' '.join(tf.sysconfig.get_compile_flags()))"

    If the following information is displayed, the update is successful:

  6. Install PyTorch.
    git clone --depth=1 --recursive  https://github.com/pytorch/pytorch
    cd pytorch
    pip install pyyaml --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple
    python setup.py install
  7. Install the dependencies.
    pip install pytest ninja mock --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple
  8. Install Horovod.
    HOROVOD_WITH_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITH_MPI=1 pip install --no-cache-dir git+https://github.com/horovod/horovod.git@master --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple