Commit 3f0a5647 authored by Gems Guo's avatar Gems Guo Committed by goooxu
Browse files

Add support for debugging mode

parent f1912f04
...@@ -4,9 +4,9 @@ language: python ...@@ -4,9 +4,9 @@ language: python
python: python:
- "3.6" - "3.6"
before_install: before_install:
- wget https://nodejs.org/dist/v10.9.0/node-v10.9.0-linux-x64.tar.xz - wget https://nodejs.org/dist/v10.10.0/node-v10.10.0-linux-x64.tar.xz
- tar xf node-v10.9.0-linux-x64.tar.xz - tar xf node-v10.10.0-linux-x64.tar.xz
- sudo mv node-v10.9.0-linux-x64 /usr/local/node - sudo mv node-v10.10.0-linux-x64 /usr/local/node
- export PATH=/usr/local/node/bin:$PATH - export PATH=/usr/local/node/bin:$PATH
- sudo sh -c 'PATH=/usr/local/node/bin:$PATH yarn global add serve' - sudo sh -c 'PATH=/usr/local/node/bin:$PATH yarn global add serve'
install: install:
......
...@@ -20,7 +20,7 @@ else # is normal user ...@@ -20,7 +20,7 @@ else # is normal user
endif endif
## Dependency information ## Dependency information
NODE_VERSION ?= v10.9.0 NODE_VERSION ?= v10.10.0
NODE_TARBALL ?= node-$(NODE_VERSION)-linux-x64.tar.xz NODE_TARBALL ?= node-$(NODE_VERSION)-linux-x64.tar.xz
NODE_PATH ?= $(INSTALL_PREFIX)/nni/node NODE_PATH ?= $(INSTALL_PREFIX)/nni/node
...@@ -294,7 +294,7 @@ ifdef _ROOT ...@@ -294,7 +294,7 @@ ifdef _ROOT
$(error You should not develop NNI as root) $(error You should not develop NNI as root)
endif endif
ifdef _MISS_DEPS ifdef _MISS_DEPS
$(error Please install Node.js, Yarn, and Serve to develop NNI) # $(error Please install Node.js, Yarn, and Serve to develop NNI)
endif endif
#$(_INFO) Pass! $(_END) #$(_INFO) Pass! $(_END)
......
...@@ -40,7 +40,7 @@ RUN pip3 --no-cache-dir install \ ...@@ -40,7 +40,7 @@ RUN pip3 --no-cache-dir install \
numpy==1.14.3 scipy==1.1.0 numpy==1.14.3 scipy==1.1.0
# #
#Install node 10.9.0, yarn 1.9.4, NNI v0.1 #Install node 10.10.0, yarn 1.9.4, NNI v0.1
# #
RUN git clone -b v0.1 https://github.com/Microsoft/nni.git RUN git clone -b v0.1 https://github.com/Microsoft/nni.git
RUN cd nni && sh install.sh RUN cd nni && sh install.sh
......
**How to contribute**
===
## Best practice for debug NNI source code
For debugging NNI source code, your development environment should be under Ubuntu 16.04 (or above) system with python 3 and pip 3 installed, then follow the below steps.
**1. Clone the source code**
Run the command
```
git clone https://github.com/Microsoft/nni.git
```
to clone the source code
**2. Prepare the debug environment and install dependencies**
Change directory to the source code folder, then run the command
```
make install-dependencies
```
to install the dependent tools for the environment
**3. Build source code**
Run the command
```
make build
```
to build the source code
**4. Install NNI to development environment**
Run the command
```
make dev-install
```
to install the distribution content to development environment, and create cli scripts
**5. Check if the environment is ready**
Now, you can try to start an experiment to check if your environment is ready
For example, run the command
```
nnictl create --config ~/nni/examples/trials/mnist/config.yml
```
And open web ui to check if everything is OK
**6. Redeploy**
After you change some code, just use **step 4** to rebuild your code, then the change will take effect immediately
---
At last, wish you have a wonderful day.
\ No newline at end of file
## How to contribute
TBD
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment