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

fresh build of Docker yields "ModuleNotFoundError: No module named 'pydicom' #81

Closed
howardpchen opened this issue Dec 24, 2018 · 7 comments

Comments

@howardpchen
Copy link

Although the Dockerfile does in fact run "pip install pydicom" after the Docker image is built "docker run pydicom/deid" using a command like inspect will fail with a package not found error.

It is possible this is related to miniconda3 using Python 3.7 but "matplotlib=2.1.2" forces a downgrade to Python 3.6.6, which occurs after the "pip install pydicom" command in the Dockerfile.

I switched the order of the conda install for matplotlib and pip install pydicom in Dockerfile and the problem went away, like this:

RUN apt-get update && apt-get install -y wget git pkg-config libfreetype6-dev
RUN /opt/conda/bin/conda install matplotlib==2.1.2
RUN pip install pydicom
RUN mkdir /code
ADD . /code
WORKDIR /code
RUN python /code/setup.py install

Could this be investigated and incorporated into the code base, if it makes sense? Thank you!

@vsoch
Copy link
Member

vsoch commented Dec 24, 2018

Could you please give me the command to reproduce the error?

@vsoch
Copy link
Member

vsoch commented Dec 24, 2018

Ah I reproduced, let me see if I can test if this is what is happening (with respect to install order).

@vsoch
Copy link
Member

vsoch commented Dec 24, 2018

Thanks for reporting the issue @howardpchen. Would you care to test the PR? I've build a container with your suggested change 👉 #82

@howardpchen
Copy link
Author

Ok @vsoch I will try now.

@howardpchen
Copy link
Author

Yes! Works well now. Thanks @vsoch

@vsoch
Copy link
Member

vsoch commented Dec 24, 2018

Sure thing! I'll merge, and that should build / push the new container (and I'll deploy the updated pypi in a few minutes). Thanks for the catch and please report any other issues that you find! I think deid is less commonly used with the Docker container (a lot of users aren't familiar with containers) so it will be good to have a more thorough testing.

@vsoch
Copy link
Member

vsoch commented Dec 24, 2018

Closing issue, thanks again!

@vsoch vsoch closed this as completed Dec 24, 2018
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