Can't import cv2 when running make test-submission

When i run make test-submission locally, I get this error

  • echo ‘Running code submission with Python’
    Running code submission with Python
  • conda run --no-capture-output -n condaenv python main.py
    Traceback (most recent call last):
    File “/code_execution/main.py”, line 7, in
    import cv2
    ImportError: libGL.so.1: cannot open shared object file: No such file or directory
    ERROR conda.cli.main_run:execute(47): conda run python main.py failed. (See above for error)
    make: *** [Makefile:167: test-submission] Error 1

I am using the image: visiomelmelanoma.azurecr.io/visiomelmelanoma-competition:gpu-latest (220af7795b9c)

Has anyone encountered the same issue ?

Thanks in advance, it would really help

Make sure you’re using the latest image. I’d suggest deleting that image and re-running make pull.

After building the container from scratch, it still gives me this error when loading cv2

1 Like

Hello emily,

I deleted current image and re-ran make pull (cpu and gpu) and I am still getting the same error message.

Thanks for raising this issue, there was indeed a dependency missing. This should now be fixed in the latest image.

1 Like

It works for me, thanks

1 Like