Scipy, Numpy, Django, Docker Issue


Having issues with scipy and numpy.
This code, part of a Django app, runs perfectly when run on my windows 10 system:

    # sparse_load is a scipy.sparse.csr_matrix
    sparse_load = scipy.sparse.load_npz(cache)'Got sparse_load')
    concept_alias_tfidfs = sparse_load.astype(numpy.float32)
    logger.exception('Something went wrong!' ) 
# code continues here ...

It also runs perfectly when running inside a docker container deployed on a Linux server.
The issue is that the type conversion (sparse_load.astype(numpy.float32)) crashes my app when running in a docker container deployed on Docker Desktop running on Windows 10. The strange thing is that logger.exception is never executed! I’ve tried other type conversions with the same result and also tried removing the astype altogether which resulted in another crash further down in the code (again w/o hitting the exception handler placed around that piece of code.


Source: Docker Questions

Categorised as django, docker, python, scipy, spacy Tagged , , , ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us