running ffmpeg with nvenc inside nvidia docker

I installed Nvidia Video Codec SDK 8.2 + ffmpeg inside a docker container by using nvidia-docker but when I run this

ffmpeg -f rawvideo -s:v 1920x1080 -r 30 -pix_fmt yuv420p -i HeavyHand_1080p.yuv -c:v h264_nvenc -preset slow -cq 10 -bf 2 -g 150 output.mp4

I got this error

Cannot load libnvidia-encode.so.1
The minimum required Nvidia driver for nvenc is 390.25 or newer Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

Otherwise nvidia-smi displays this

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 396.44                 Driver Version: 396.44                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:0F:00.0  On |                  N/A |
| 35%   30C    P8    N/A /  75W |    299MiB /  4033MiB |      1%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

this gpu used is GeForce 1050 Ti and the cuda version is 9.0