"composable_kernel/include/config.hpp" did not exist on "f2ac7832c65969f5b3ecf7972518d55ee099c03b"
Commit 6873a3cf authored by Zejun Lin's avatar Zejun Lin Committed by QuanluZhang
Browse files

support conda (#90) (#110)

* support install from venv and travis CI

* support install from venv and travis CI

* support install from venv and travis CI

* support conda

* support conda

* modify example config path to relative path and increase maxTrialNum

* undo messy commit

* undo messy commit
parent cc5218e5
# Setting variables
SHELL := /bin/bash
PIP_INSTALL := python3 -m pip install
PIP_UNINSTALL := python3 -m pip uninstall
## Install directories
ifeq ($(shell id -u), 0) # is root
......@@ -143,8 +145,8 @@ dev-install:
.PHONY: uninstall
uninstall:
-pip3 uninstall -y nni
-pip3 uninstall -y nnictl
-$(PIP_UNINSTALL) -y nni
-$(PIP_UNINSTALL) -y nnictl
-rm -rf $(INSTALL_PREFIX)/nni
-rm -f $(BIN_PATH)/nnimanager
-rm -f $(BIN_PATH)/nnictl
......@@ -219,10 +221,10 @@ install-node-modules:
.PHONY: install-dev-modules
install-dev-modules:
#$(_INFO) Installing Python SDK $(_END)
cd src/sdk/pynni && pip3 install $(PIP_MODE) -e .
cd src/sdk/pynni && $(PIP_INSTALL) $(PIP_MODE) -e .
#$(_INFO) Installing nnictl $(_END)
cd tools && pip3 install $(PIP_MODE) -e .
cd tools && $(PIP_INSTALL) $(PIP_MODE) -e .
mkdir -p $(INSTALL_PREFIX)/nni
......
......@@ -161,10 +161,6 @@ function parseArg(names: string[]): string {
function getMsgDispatcherCommand(tuner: any, assessor: any): string {
let command: string = `python3 -m nni --tuner_class_name ${tuner.className}`;
if (process.env.VIRTUAL_ENV) {
command = path.join(process.env.VIRTUAL_ENV, 'bin/') +command;
}
if (tuner.classArgs !== undefined) {
command += ` --tuner_args ${JSON.stringify(JSON.stringify(tuner.classArgs))}`;
}
......
......@@ -236,14 +236,16 @@ class NNIManager implements Manager {
newCwd = cwd;
}
// TO DO: add CUDA_VISIBLE_DEVICES
const tunerProc: ChildProcess = spawn(command, [], {
stdio,
cwd: newCwd,
env: {
let nniEnv = {
NNI_MODE: mode,
NNI_CHECKPOINT_DIRECTORY: dataDirectory,
NNI_LOG_DIRECTORY: getLogDir()
},
};
let newEnv = Object.assign({}, process.env, nniEnv);
const tunerProc: ChildProcess = spawn(command, [], {
stdio,
cwd: newCwd,
env: newEnv,
shell: true
});
this.dispatcherPid = tunerProc.pid;
......
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