faroit / python_audio_loading_benchmark

Benchmark popular audio i/o packages
138 stars 10 forks source link

Be more specific on how to run the docker container #5

Open hagenw opened 5 years ago

hagenw commented 5 years ago

When you are not used to docker the current documentation is not very explicit on how to mount and run the actual docker container.

E.g. when I run the following:

docker run -v AUDIO:/app/AUDIO audio_benchmark run.sh

I get

docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"run.sh\": executable file not found in $PATH": unknown.
ERRO[0000] error waiting for container: context canceled

And if I log into the container with

docker run -v AUDIO:/app/AUDIO -it audio_benchmark

I'm in a python console and the content of the folder I'm in is:

>>> import os
>>> os.listdir()
['requirements.txt', 'AUDIO', 'pytorchaudio', 'aubio_src']
faroit commented 5 years ago

yes you are right. the problem is that the commands depend a bit on the OS (e.g. relative paths vs absolute paths for dockers -v mounts). Also I don't think this repo is important enough for introducing the docker basics ;-)

So I generally mount the whole repo folder...

docker run -v /home/user/repos/python_audio_loading_benchmark
/:/app -it audio-loading-benchmark:latest /bin/bash run.sh

I can add this to the readme, if this makes sense?

hagenw commented 5 years ago

Maybe it is also ok to assume from a user to learn docker, but I wasn't able to figure it out in 10 minutes. If it depends for different operation systems, then maybe you add it as an example:

Mount the data directory into the docker container and run `run.sh` inside the
container, e.g.:
```bash
docker run -v /home/user/repos/python_audio_loading_benchmark/:/app \
    -it audio_benchmark:latest /bin/bash run.sh


In addition, it might help to be more explicit if the plot command should also be run in docker and how to access the plots/results.
faroit commented 5 years ago

If it depends for different operation systems, then maybe you add it as an example:

looks good, will add this

In addition, it might help to be more explicit if the plot command should also be run in docker and how to access the plots/results.

yes, true. Saving the pickles is also not optimal. I am open to a better pipeline

hagenw commented 5 years ago

That's true, but I was not motivated to change that either. It might also not being worth the effort, but lets see.

BTW, I was now able to run the container and reproduce your results.