Skip to content

Commit

Permalink
Merge pull request #122 from kengz/grunt-remote-fix
Browse files Browse the repository at this point in the history
Grunt remote fix
  • Loading branch information
kengz authored Apr 16, 2017
2 parents 13c208f + 3b7c002 commit 80eff0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ module.exports = function(grunt) {
eStr = resumeExperimentStr(eStr)
}

const envCmd = 'if (conda env list | grep --quiet "openai_lab"); then echo "activating conda"; source activate openai_lab; elif [ -d ./.env ]; then echo "activating virtualenv"; source .env/bin/activate; else echo "using system python"; fi;'
const envCmd = 'if (conda env list | grep --quiet "openai_lab"); then echo "activating conda"; source activate openai_lab; elif [ -d ./.env ]; then echo "activating virtualenv"; source .env/bin/activate; else echo "using system python"; fi; '

// override with custom command if has 'python'
const pyCmd = _.includes(eStr, 'python') ? eStr : `python3 main.py${bestCmd()}${debugCmd()}${quietCmd()} -t 5 -e ${eStr}`
const cmd = `${remoteCmd()} ${envCmd} ${pyCmd} | tee ./data/terminal.log; ${notiCmd(eStr)}`
const cmd = `${envCmd}${remoteCmd()} ${pyCmd} | tee ./data/terminal.log; ${notiCmd(eStr)}`
grunt.log.ok(`Composed command: ${cmd}`)
return cmd
}
Expand Down

0 comments on commit 80eff0e

Please sign in to comment.