1

I cannot connect my docker container to my microphone or local directory on Windows 10 and have been troubleshooting for some time, but I cannot find the issue. I would be truly grateful if anyone could give guidance.

Here is my Dockerfile:

FROM python:3.9-buster
WORKDIR /app
COPY requirements.txt .
RUN python3 -m pip install -r requirements.txt --no-cache-dir
COPY src/ /app
CMD [ "python3", "-u" ,"/app/main.py" ]

The error message is "OSError: sndfile library not found".

Batoot
  • 31
  • 1
  • 4
  • If you need to use the host's hardware devices and filesystem, you might find it substantially easier to run the program outside of Docker. You can use a Python virtual environment to isolate your application's dependencies from the rest of the system. – David Maze Oct 05 '21 at 13:14
  • I can not get your full idea, please elaborate more. My code should read the microphone and process the output, then save the results to my local directory. – Batoot Oct 05 '21 at 13:47
  • My python code is doing exactly what it should do outside the docker container. – Batoot Oct 05 '21 at 13:55
  • ...then you're all set, just run your working code without Docker involved? – David Maze Oct 05 '21 at 16:47
  • I need docker because my code should run automatically as an application. Also, the docker container should interact with another docker container. This means the output of the first container will be the input of the second one. – Batoot Oct 06 '21 at 09:07

0 Answers0