Skip to content

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

Description

@hagenw

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']

Activity

  1. faroit commented on Mar 21, 2019

    @faroit
    Owner

    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?

  2. hagenw commented on Mar 21, 2019

    @hagenw
    ContributorAuthor

    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.

  3. faroit commented on Mar 21, 2019

    @faroit
    Owner

    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

  4. hagenw commented on Mar 21, 2019

    @hagenw
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions