fourMs / MGT-python

Musical Gestures Toolbox for Python
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/musicalgesturestoolbox/mgt-python/index.html
GNU General Public License v3.0
52 stars 11 forks source link

Fix wget model download scripts in Colab #194

Closed balintlaczko closed 3 years ago

balintlaczko commented 3 years ago

There are some nuances that will be better sorted out in a dedicated Colab version.

balintlaczko commented 3 years ago

Ipython dependency fixed. FFmpeg also needs to be updated to v4 in order for skipping to work. The atempo filter only has a range of [0.5 - 2] in the earlier version, and [0.5 - 100] in the newer version. So in the earlier one, anything higher than skip=1 will throw an ffmpeg error (value out of range).

balintlaczko commented 3 years ago

added cells to update to FFmpeg 4, that problem is solved. Now it looks like the model downloader shell scripts have the wrong EOL format, that confuses wget in Colab. It is also a question whether the download sequence will stay functional if sudo password is empty. Should make an option not to query sudo password (specifically for working in Colab).

balintlaczko commented 3 years ago

The EOL problem is strange, since it does not appear to be a problem on my local Ubuntu. The Colab is (or seems to be) a Ubuntu as well, but I get the following response (error):

Could not find weights file. Do you want to download it (~200MB)? (y/n)
y
[sudo] password for root:
··········
/usr/local/lib/python3.7/dist-packages/musicalgestures/pose/getMPI_remote.sh: line 4: $'\r': command not found

wget: unrecognized option '--no-check-certificate

'

Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

/usr/local/lib/python3.7/dist-packages/musicalgestures/pose/getMPI_remote.sh: line 8: $'\r': command not found
balintlaczko commented 3 years ago

After removing the empty lines, I only get one problem:

Trimming: |████████████████████████████████████████| 100.0% Complete
Could not find weights file. Do you want to download it (~200MB)? (y/n)
y
wget: unrecognized option '--no-check-certificate

'

Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

Will try to add a whitespace after --no-check-certificate.

balintlaczko commented 3 years ago

Will change this issue to only focus on the wget problem (displayed above) in the Pose module when working in Colab.

balintlaczko commented 3 years ago

The solution was to create alternative versions of the shell scripts.