Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can I not install soundfile in a Tensorman container? #35

Open
veirs opened this issue Feb 27, 2022 · 5 comments
Open

Why can I not install soundfile in a Tensorman container? #35

veirs opened this issue Feb 27, 2022 · 5 comments

Comments

@veirs
Copy link

veirs commented Feb 27, 2022

I can use tensorman run --gpu etc. to create a container. But, when I install libraries, one library does not appear to install. Why?

python3 -m pip install matplotlib numpy scipy soundfile # installs all these dependencies fine when accessed from outside of the container in a terminal window.

But, inside the tensorman container, the matplotlib, numpy, scipy import fine but the soundfile dependency does not.
import soundfile # returns
OSError:sndfile library not found

The soundfile library reads and writes audio files and I wonder if there may be some subtle permissions issue?

Help!!!

@mmstick
Copy link
Member

mmstick commented Feb 27, 2022

When you start a container from an image, the container's environment only exists in memory. You have to save the container to a new image to retain any changes you made to it.

@veirs
Copy link
Author

veirs commented Feb 27, 2022

The problem seems to be that yes, I can make changes to the image and yes, I can save the changes and then, later, run the new image. But, in contrast to all the other dependencies that I installed in the new image, soundfile (https://github.com/bastibe/python-soundfile) 'installs' it seems but then is not recognized when import soundfile is executed in python. All these same procedures work properly when run outside of the container.
I will attach a txt file with snippets of this problem and thank you for looking into this with me
tensorman_issues.txt
.

@mmstick
Copy link
Member

mmstick commented Feb 27, 2022

Did you also install the system dependency for that? Not just the Python library.

@veirs
Copy link
Author

veirs commented Feb 28, 2022

I suspect you are pointing me toward something that the soundfile python library must use to access files. I don't know what the soundfile python library might 'depend' upon. I do know that it runs fine outside of the Tensorman container.

@veirs
Copy link
Author

veirs commented Feb 28, 2022

I think I have found it. I likely need something called PortAudio installed in the container. I will figure this out. Thanks for your help. If I get a simple solution, I will post it back here so that someone else might be able to use soundfile to read audio and then process data via Tensorman.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants