-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[20200427] Installation Setup
This page documents how installation works in detail.
Last update: 2020-04-27 (v1.5)
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
andinstall.sh
)- including install source code as soft link, aka "dev-install"
- On Windows, install from source code (
install.ps1
anduninstall.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)
- Need add
- Trial keeper:
nni_trial_tool
- GPU metrics collector:
nni_gpu_tool
- Main SDK:
- Node packages
- NNI manager
- Web UI
- NAS UI
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.json
←nni_manager/package.json
-
nni/static/
←webui/build/
-
nni/nasui/
←nasui/
(server.js
andbuild/
)
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.
TBD
TBD
TBD
TBD
This wiki is a journal that tracks the development of NNI. It's not guaranteed to be up-to-date. Read NNI documentation for latest information: https://nni.readthedocs.io/en/latest/