我要评分
获取效率
正确性
完整性
易理解

Installing TensorFlow

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Download the TenforFlow source code.
    git clone https://github.com/tensorflow/tensorflow.git
  3. For the GPU version, you need to install the the CUDA Toolkit by yourself.
  4. Configure TensorFlow compilation options.
    cd tensorflows-xxx
    ./configure

    The configuration for the GPU version is as follows:

  5. Create a .whl file.
    bazel clean –expunge
  6. The compilation commands for the GPU version are as follows:
    bazel build --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
    mkdir tensorflow-pkg
    bazel-bin/tensorflow/tools/pip_package/build_pip_package --gpu ./tensorflow-pkg
  7. The generated .whl file is stored in the tensorflow_pkg directory. Run the following command to install it:
    pip install tensorflow-xxx.whl