Closed nbpham closed 1 year ago
https://github.com/chrisdonahue/sheetsage/issues/9#issuecomment-1504951029 Temporary solution.
Thank you sxjeru, I was able to do step 1 &2 but I got stuck on step 3, would you please help me to complete step 3?
Step 1:
mkdir from-github && cd from-github && git clone https://github.com/chrisdonahue/sheetsage.git
Step 2:
Then modify your local copy of prepare.sh: after SHEETSAGE_CACHE_DIR, add: SHEETSAGE_GITHUB_DIR=$(pwd)/from-github
Step 3: Not sure if I followed the instructions correctly. Basically I issued the command 'docker run' with the -v option as shown below. It came back with the right arrow key > on the next line and I don't know what to do next. Please help me.
in the docker run command, add: -v $SHEETSAGE_GITHUB_DIR/sheetsage/assets:/sheetsage/sheetsage/assets \
root@npham-OMEN-by-HP-Laptop-15-ce0xx:/home/npham# docker run -v $SHEETSAGE_GITHUB_DIR/sheetsage/assets:/sheetsage/sheetsage/assets \
step 3 is also to modify prepare.sh, at the bottom of the file, as follows.
docker run \
-it \
--rm \
-u $(id -u) \
${DOCKER_LINK_LIB_ARG} \
-v $SHEETSAGE_CACHE_DIR:/sheetsage/cache \
-v $SHEETSAGE_GITHUB_DIR/sheetsage/sheetsage/assets:/sheetsage/sheetsage/assets \
chrisdonahue/sheetsage \
/bin/bash -c \
"python -m sheetsage.assets SHEETSAGE_V02_HANDCRAFTED ${JUKEBOX_CMD}"
Thank you sxjeru very much again! I think I am very close to getting this thing to work with your help. I am still getting errors from my latest runs. I modified prepare.sh in my home directory and also run Sheet Sage from that directory. Below is what I have in my prepare.sh in my home directory.
SHEETSAGE_CACHE_DIR=$(pwd)/from-github
if [ -f "$(pwd)/setup.py" ] && [ -d "$(pwd)/sheetsage" ]; then DOCKER_LINK_LIB_ARG="-v $(pwd)/sheetsage:/sheetsage/sheetsage" else DOCKER_LINK_LIB_ARG="" fi
while [[ $# -gt 0 ]]; do case $1 in -j|--use_jukebox) JUKEBOX_CMD="&& python -m sheetsage.assets SHEETSAGE_V02_JUKEBOX && python -m sheetsage.assets JUKEBOX " shift ;; *) echo "Unknown option $1" exit 1 ;; esac done
mkdir -p $SHEETSAGE_CACHE_DIR docker run \ -it \ --rm \ -u $(id -u) \ ${DOCKER_LINK_LIB_ARG} \ -v $SHEETSAGE_CACHE_DIR:/sheetsage/cache \ -v $SHEETSAGE_GITHUB_DIR/sheetsage/sheetsage/assets:/sheetsage/sheetsage/assets \ chrisdonahue/sheetsage \ /bin/bash -c \ "python -m sheetsage.assets SHEETSAGE_V02_HANDCRAFTED ${JUKEBOX_CMD}"
Here is the output of my latest run that resulted in quite a few error messages. Would you please tell me what to do to fix it? Thank you very much again!
npham@npham-OMEN-by-HP-Laptop-15-ce0xx:~$ ./sheetsage.sh TuBiet.mp3 Copying input file TuBiet.mp3 to container as ./output/input Running Sheet Sage via Docker with args: /sheetsage/output/input INFO:root:Loading audio from /sheetsage/output/input INFO:root:DETECTING_BEATS INFO:root:EXTRACTING_FEATURES 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:07<00:00, 1.01it/s] Traceback (most recent call last): File "/sheetsage/sheetsage/assets.py", line 120, in retrieve_asset _download(url, path) File "/sheetsage/sheetsage/assets.py", line 46, in _download r = urllib.request.urlopen(url) File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.6/urllib/request.py", line 564, in error result = self._call_chain(args) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib/python3.6/urllib/request.py", line 756, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/sheetsage/sheetsage/infer.py", line 810, in
When you run prepare.sh, is the output all Verified
, no error message.
To be honest, I haven't encountered the same problem, so it's hard to help you, a bit sorry.
Thank you again sxjeru. I ran prepare.sh without any error messages. In any events, I am going to try it again from the beginning on another fresh Linux Ubuntu desktop. I am going to pay attention to the location of the directories this time around. Hopefully I will figure out the issue myself. Again thank you very much for your help.
Hello, I received the following errors when downloading the Docker container. The execution of Sheet Sage failed and pointed to the same error messages related to python3.6. Please help me. Thank you!
~$ ROOT=https://raw.githubusercontent.com/chrisdonahue/sheetsage/main; wget $ROOT/prepare.sh && wget $ROOT/sheetsage.sh && chmod +x *.sh && ./prepare.sh --2023-04-19 09:12:30-- https://raw.githubusercontent.com/chrisdonahue/sheetsage/main/prepare.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 884 [text/plain] Saving to: ‘prepare.sh.5’
prepare.sh.5 100%[===================>] 884 --.-KB/s in 0s
2023-04-19 09:12:30 (20.6 MB/s) - ‘prepare.sh.5’ saved [884/884]
--2023-04-19 09:12:30-- https://raw.githubusercontent.com/chrisdonahue/sheetsage/main/sheetsage.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.109.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 2018 (2.0K) [text/plain] Saving to: ‘sheetsage.sh.5’
sheetsage.sh.5 100%[===================>] 1.97K --.-KB/s in 0s
2023-04-19 09:12:30 (20.7 MB/s) - ‘sheetsage.sh.5’ saved [2018/2018]
INFO:root:-------------------------------------------------------------------------------- INFO:root:Verifying asset: SHEETSAGE_V02_HANDCRAFTED_HARMONY_CFG INFO:root:Asset location: /sheetsage/cache/sheetsage/v0.2/0919_02_e0908_oafmelspecnorm/5b739ce5efa2b6d4d70c5f1feac802684f0ee6f4.cfg.json INFO:root:Downloading from: https://nlp.stanford.edu/data/cdonahue/sheetsage/sheetsage/v0.2/0919_02_e0908_oafmelspecnorm/5b739ce5efa2b6d4d70c5f1feac802684f0ee6f4.cfg.json ERROR:root:Download failed: HTTP Error 404: Not Found INFO:root:-------------------------------------------------------------------------------- INFO:root:Verifying asset: SHEETSAGE_V02_HANDCRAFTED_HARMONY_STEP INFO:root:Asset location: /sheetsage/cache/sheetsage/v0.2/0919_02_e0908_oafmelspecnorm/step.pkl INFO:root:Downloading from: https://nlp.stanford.edu/data/cdonahue/sheetsage/sheetsage/v0.2/0919_02_e0908_oafmelspecnorm/step.pkl ERROR:root:Download failed: HTTP Error 404: Not Found INFO:root:-------------------------------------------------------------------------------- INFO:root:Verifying asset: SHEETSAGE_V02_HANDCRAFTED_MELODY_MODEL INFO:root:Asset location: /sheetsage/cache/sheetsage/v0.2/0919_00_e0830_oafmelspecnorm/model.pt INFO:root:Downloading from: https://nlp.stanford.edu/data/cdonahue/sheetsage/sheetsage/v0.2/0919_00_e0830_oafmelspecnorm/model.pt ERROR:root:Download failed: HTTP Error 503: Service Temporarily Unavailable INFO:root:-------------------------------------------------------------------------------- INFO:root:Verifying asset: SHEETSAGE_V02_HANDCRAFTED_MOMENTS INFO:root:Asset location: /sheetsage/cache/sheetsage/v0.2/oafmelspec_moments.npy INFO:root:Downloading from: https://nlp.stanford.edu/data/cdonahue/sheetsage/sheetsage/v0.2/oafmelspec_moments.npy ERROR:root:Download failed: HTTP Error 404: Not Found multiprocessing.pool.RemoteTraceback: """ Traceback (most recent call last): File "/sheetsage/sheetsage/assets.py", line 120, in retrieve_asset _download(url, path) File "/sheetsage/sheetsage/assets.py", line 46, in _download r = urllib.request.urlopen(url) File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.6/urllib/request.py", line 564, in error result = self._call_chain(args) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib/python3.6/urllib/request.py", line 756, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker result = (True, func(*args, *kwds)) File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar return list(map(args)) File "/sheetsage/sheetsage/assets.py", line 162, in task raise e File "/sheetsage/sheetsage/assets.py", line 159, in task retrieve_asset(t, delete_wrong=args.delete_wrong) File "/sheetsage/sheetsage/assets.py", line 124, in retrieve_asset raise Exception(f"Download failed: {e}") Exception: Download failed: HTTP Error 404: Not Found """
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/sheetsage/sheetsage/assets.py", line 165, in
p.map(task, tags)
File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
Exception: Download failed: HTTP Error 404: Not Found
npham@npham-OMEN-by-HP-Laptop-15-ce0xx:~$
npham@npham-OMEN-by-HP-Laptop-15-ce0xx:~$ sudo ./sheetsage.sh https://www.youtube.com/watch?v=ZInWGC5L2T8 Running Sheet Sage via Docker with args: https://www.youtube.com/watch?v=ZInWGC5L2T8 INFO:root:FETCHING_AUDIO INFO:root:Retrieving audio from https://www.youtube.com/watch?v=ZInWGC5L2T8 Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/sheetsage/sheetsage/infer.py", line 810, in
tqdm=tqdm,
File "/sheetsage/sheetsage/infer.py", line 613, in sheetsage
audio_path_or_bytes = retrieve_audio_bytes(audio_path_bytes_or_url)
File "/sheetsage/sheetsage/utils.py", line 204, in retrieve_audio_bytes
raise Exception(f"Failed to retrieve from {url}:\n{stderr}\n{stdout}")
Exception: Failed to retrieve from https://www.youtube.com/watch?v=ZInWGC5L2T8:
ERROR: [youtube] ZInWGC5L2T8: Unable to extract uploader id; please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U
[youtube] ZInWGC5L2T8: Downloading webpage
[youtube] ZInWGC5L2T8: Downloading android player API JSON
npham@npham-OMEN-by-HP-Laptop-15-ce0xx:~$