Python Forum
(Path?)Problems with dockerizing a python app - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: (Path?)Problems with dockerizing a python app (/thread-34320.html)



(Path?)Problems with dockerizing a python app - sgofferj - Jul-19-2021

Hi,

I don't know much about Python - haven't used it much yet. I'm trying to dockerize a python 2 app which doesn't seem to be maintained anymore: ham2mon, https://github.com/madengr/ham2mon
I have created a Docker file which should contain everything needed and the container builds fine:
FROM python:2-buster

RUN apt-get update -y
RUN apt-get install gnuradio-dev -y
WORKDIR /usr/src/app

COPY . .

CMD [ "python", "./ham2mon.py" ]
However, when I start it I get an error:
Error:
Traceback (most recent call last): File "./ham2mon.py", line 9, in <module> import scanner as scnr File "/usr/src/app/scanner.py", line 9, in <module> import receiver as recvr File "/usr/src/app/receiver.py", line 9, in <module> from gnuradio import gr ImportError: No module named gnuradio
I think I know enough about Python to recognize that this is some kind of path issue because during the container build process, I can see that gnuradio 3.7.13 is installed, but I don't know how to tackle that. Any help would be greatly appreciated!

-Stefan