neuro-inc / neuro-cli

Platform-specific API and CLI python client
https://neu-ro.gitbook.io/neu-ro-cli-reference/
Other
19 stars 7 forks source link

Disable formating for generate-run-command #2042

Closed atemate closed 3 years ago

atemate commented 3 years ago

Newlines break bash syntax:

$ n job generate-run-command job-f1428fdd-c6e1-4a0c-8039-597db9497c78
neuro run --preset cpu-small --tag flow:live --tag job:model --tag project:mlops-outforz --description live.model --volume storage://neuro-compute/artemyushkovskiy/mlops-outforz/src:/project/src:ro --env 
PYTHONPATH=/project --env RABBITMQ_HOST=job-c6feec4c-a5f8-42d7-8378-5eb1d8e40539.platform-jobs --life-span 100500d image://neuro-compute/artemyushkovskiy/mlops-outforz/worker:v1.3 bash -euo pipefail -c 'python 
/project/src/workers/model.py \
  --model_url=http://job-c2412301-4713-4d31-b5e4-6382a56ab427.platform-jobs:5000/predict
'

$ neuro run --preset cpu-small --tag flow:live --tag job:model --tag project:mlops-outforz --description live.model --volume storage://neuro-compute/artemyushkovskiy/mlops-outforz/src:/project/src:ro --env 
PYTHONPATH=/project --env RABBITMQ_HOST=job-c6feec4c-a5f8-42d7-8378-5eb1d8e40539.platform-jobs --life-span 100500d image://neuro-compute/artemyushkovskiy/mlops-outforz/worker:v1.3 bash -euo pipefail -c 'python
/project/src/workers/model.py \
  --model_url=http://job-c2412301-4713-4d31-b5e4-6382a56ab427.platform-jobs:5000/predict
'
Error: --env option requires an argument
zsh: command not found: --env
YevheniiSemendiak commented 3 years ago

done here https://github.com/neuro-inc/platform-client-python/pull/2034