Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from leckie-chn/dev-mac-support
Browse files Browse the repository at this point in the history
merge dev mac support to local branch
  • Loading branch information
leckie-chn authored Nov 13, 2018
2 parents 221e951 + cca83a2 commit 5d001f7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
25 changes: 21 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,23 @@
PIP_INSTALL := python3 -m pip install
PIP_UNINSTALL := python3 -m pip uninstall

# detect OS
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Linux)
OS_SPEC := linux
ESC_CMD := \e
else ifeq ($(UNAME_S), Darwin)
OS_SPEC := darwin
ESC_CMD := \x1B
else
$(error platform $(UNAME_S) not supported)
endif


## Colorful output
_INFO := $(shell echo -e '\e[1;36m')
_WARNING := $(shell echo -e '\e[1;33m')
_END := $(shell echo -e '\e[0m')
_INFO := $(shell echo -e '$(ESC_CMD)[1;36m')
_WARNING := $(shell echo -e '$(ESC_CMD)[1;33m')
_END := $(shell echo -e '$(ESC_CMD)[0m')

## Install directories
ifeq ($(shell id -u), 0) # is root
Expand All @@ -18,8 +31,12 @@ else # is normal user
ifndef VIRTUAL_ENV
PIP_MODE ?= --user
endif
BASH_COMP_SCRIPT ?= ${HOME}/.bash_completion.d/nnictl
BASH_COMP_PREFIX ?= ${HOME}/.bash_completion.d
endif
BASH_COMP_SCRIPT := $(BASH_COMP_PREFIX)/nnictl

NNI_INSTALL_PATH ?= $(INSTALL_PREFIX)/nni
NNI_TMP_PATH ?= /tmp

BIN_FOLDER ?= $(ROOT_FOLDER)/bin
NNI_PKG_FOLDER ?= $(ROOT_FOLDER)/nni
Expand Down
2 changes: 1 addition & 1 deletion src/nni_manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "index.js",
"scripts": {
"postbuild": "cp -f --parent scripts/*.py ./dist/",
"postbuild": "cp -rf scripts ./dist/",
"build": "tsc",
"test": "mocha -r ts-node/register -t 15000 --recursive **/*.test.ts --colors",
"start": "node dist/main.js"
Expand Down

0 comments on commit 5d001f7

Please sign in to comment.