0

I'm trying to use python fast-bert library to load it to Amazon's SageMaker using their script in container/build_and_push.sh but then in SageMaker I receive error /usr/bin/env: ‘python\r’: No such file or directory.

I understand it's related to to Windows/Linux differences, but how can I get rid of it in this script, because I'm not familiar with shell at all :/ Thanks in advance!

https://github.com/kaushaltrivedi/fast-bert/blob/master/container/build_and_push.sh
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • Maybe you don't have the file /usr/bin/env - perhaps change the shebang to /bin/bash or /usr/bin/bash helps - although I'm wondering what the python\r is doing there.... –  Dec 12 '20 at 18:18
  • Alter your editor to use "unix" style line endings (\n) instead of "DOS" style (\r\n) – glenn jackman Dec 12 '20 at 18:47
  • See ["Are shell scripts sensitive to encoding and line endings?"](https://stackoverflow.com/questions/39527571/are-shell-scripts-sensitive-to-encoding-and-line-endings) – Gordon Davisson Dec 12 '20 at 18:53
  • https://notepad-plus-plus.org – alecxs Dec 12 '20 at 19:14

0 Answers0