import lightgbm inside docker images

I have successfully built a docker image where I will run a lightgbm model.

I run the container without a problem.

When I start runing my script that contains : import lightgbm as lgb

I get the error bellow:

`[email protected]:/physionet2019# python /Users/macbook/Desktop/Docker_test/input_directory /Users/macbook/Desktop/Docker_test/output_directory
Traceback (most recent call last):
  File "", line 5, in <module>
    from get_sepsis_score import *
  File "/physionet2019/", line 5, in <module>
    import lightgbm as lgb
  File "/usr/local/lib/python3.7/site-packages/lightgbm/", line 8, in <module>
    from .basic import Booster, Dataset
  File "/usr/local/lib/python3.7/site-packages/lightgbm/", line 33, in <module>
    _LIB = _load_lib()
  File "/usr/local/lib/python3.7/site-packages/lightgbm/", line 28, in _load_lib
    lib = ctypes.cdll.LoadLibrary(lib_path[0])
  File "/usr/local/lib/python3.7/ctypes/", line 434, in LoadLibrary
    return self._dlltype(name)
  File "/usr/local/lib/python3.7/ctypes/", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: cannot open shared object file: No such file or directory`

How can I solve this issue please?

Additional information:

My requirement.txt is :



FROM python:3.7.3-slim

## The MAINTAINER instruction sets the Author field of the generated images
MAINTAINER [email protected]
## DO NOT EDIT THESE 3 lines
RUN mkdir /physionet2019
COPY ./ /physionet2019
WORKDIR /physionet2019

## Install your dependencies here using apt-get etc.

## Do not edit if you have a requirements.txt
RUN pip install -r requirements.txt

Source: StackOverflow