File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,11 @@ module.exports = function(grunt) {
110110 eStr = resumeExperimentStr ( eStr )
111111 }
112112
113+ 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;'
114+
113115 // override with custom command if has 'python'
114- var pyCmd = _ . includes ( eStr , 'python' ) ? eStr : `python3 main.py${ bestCmd ( ) } ${ debugCmd ( ) } ${ quietCmd ( ) } -t 5 -e ${ eStr } `
115- const cmd = `${ remoteCmd ( ) } ${ pyCmd } | tee ./data/terminal.log; ${ notiCmd ( eStr ) } `
116+ const pyCmd = _ . includes ( eStr , 'python' ) ? eStr : `python3 main.py${ bestCmd ( ) } ${ debugCmd ( ) } ${ quietCmd ( ) } -t 5 -e ${ eStr } `
117+ const cmd = `${ remoteCmd ( ) } ${ envCmd } ${ pyCmd } | tee ./data/terminal.log; ${ notiCmd ( eStr ) } `
116118 grunt . log . ok ( `Composed command: ${ cmd } ` )
117119 return cmd
118120 }
You can’t perform that action at this time.
0 commit comments