0 [20200427] Installation Setup
Yuge Zhang редактировал(а) эту страницу 2022-03-23 07:57:18 +00:00

This page documents how installation works in detail.

Last update: 2020-04-27 (v1.5)

Overview

From installation script developers' perspective, NNI supports 4 installation methods:

  • Pip install (deployment/pypi/)
  • Docker image (deployment/docker/Dockerfile)
  • On Linux and macOS, install from source code (Makefile and install.sh)
    • including install source code as soft link, aka "dev-install"
  • On Windows, install from source code (install.ps1 and uninstall.ps1)

Each method needs to install 2 major parts and their dependencies: (Should link to NNI modules doc here)

  • Python packages
    • Main SDK: nni
    • REST API wrapper: nnicli
    • HPO annotation preprocessor: nni_annotation
    • nnictl command: nni_cmd
      • Need add nnictl command to PATH
      • Should also install bash auto-completion script (only supported by source install as of v1.5)
    • Trial keeper: nni_trial_tool
    • GPU metrics collector: nni_gpu_tool
  • Node packages
    • NNI manager
    • Web UI
    • NAS UI

Pip Install

Pip install method manages its own Makefile and install.ps1, which must be run first before triggering setup.py. This workflow is implemented in deployment/deployment-pipelines.yml.

Makefile builds and copies Node packages to following directories and files:

  • nni/dist/nni_manager/dist/
  • nni/config/nni_manager/config/
  • nni/package.jsonnni_manager/package.json
  • nni/static/webui/build/
  • nni/nasui/nasui/ (server.js and build/)

Makefile invoked yarn --prod after copying files. I don't know what it does.

Then setup.py install Python packages in the Pythonic way. Since all Node files are placed inside nni (main SDK) package folder, they are considered nni package's asset files.

nnictl is registered as Python "entry point" by setup.py.

Python dependencies are manually listed in setup.py. Though the Python script collects all requirements.txt files, I believe they are never used.

Docker Image

TBD

Make Install

TBD

Dev Make Install

TBD

Windows Install

TBD