# Installation of NNI Currently we support installation on Linux, macOS and Windows. ## Install on Linux or macOS * Install NNI through pip Prerequisite: `python 64-bit >= 3.5` ```bash python3 -m pip install --upgrade nni ``` * Install NNI through source code If you are interested on special or latest code version, you can install NNI through source code. Prerequisites: `python 64-bit >=3.5`, `git`, `wget` ```bash git clone -b v0.8 https://github.com/Microsoft/nni.git cd nni ./install.sh ``` * Use NNI in a docker image You can also install NNI in a docker image. Please follow the instructions [here](https://github.com/Microsoft/nni/tree/master/deployment/docker/README.md) to build NNI docker image. The NNI docker image can also be retrieved from Docker Hub through the command `docker pull msranni/nni:latest`. ## Install on Windows Anaconda or Miniconda is highly recommended to manage multiple Python environments. * Install NNI through pip Prerequisites: `python 64-bit >= 3.5` ```bash python -m pip install --upgrade nni ``` * Install NNI through source code If you are interested on special or latest code version, you can install NNI through source code. Prerequisites: `python 64-bit >=3.5`, `git`, `PowerShell`. ```bash git clone -b v0.8 https://github.com/Microsoft/nni.git cd nni powershell -ExecutionPolicy Bypass -file install.ps1 ``` ## Verify installation The following example is built on TensorFlow 1.x. Make sure **TensorFlow 1.x is used** when running it. * Download the examples via clone the source code. ```bash git clone -b v1.3 https://github.com/Microsoft/nni.git ``` * Run the MNIST example. Linux or macOS ```bash nnictl create --config nni/examples/trials/mnist-tfv1/config.yml ``` Windows ```bash nnictl create --config nni\examples\trials\mnist-tfv1\config_windows.yml ``` * Wait for the message `INFO: Successfully started experiment!` in the command line. This message indicates that your experiment has been successfully started. You can explore the experiment using the `Web UI url`. ```text INFO: Starting restful server... INFO: Successfully started Restful server! INFO: Setting local config... INFO: Successfully set local config! INFO: Starting experiment... INFO: Successfully started experiment! ----------------------------------------------------------------------- The experiment id is egchD4qy The Web UI urls are: http://223.255.255.1:8080 http://127.0.0.1:8080 ----------------------------------------------------------------------- You can use these commands to get more information about the experiment ----------------------------------------------------------------------- commands description 1. nnictl experiment show show the information of experiments 2. nnictl trial ls list all of trial jobs 3. nnictl top monitor the status of running experiments 4. nnictl log stderr show stderr log content 5. nnictl log stdout show stdout log content 6. nnictl stop stop an experiment 7. nnictl trial kill kill a trial job by id 8. nnictl --help get help information about nnictl ----------------------------------------------------------------------- ``` * Open the `Web UI url` in your browser, you can view detail information of the experiment and all the submitted trial jobs as shown below. [Here](../Tutorial/WebUI.md) are more Web UI pages.
![]() |
![]() |
|---|