Install lib in nvidia-docker

I can install lib in nvidia docker using apt-get. But after exiting the docker, the lib doesn’t exist anymore. How can I install permanently in the docker?

Please run as below.

  1. $ docker run --runtime=nvidia -it <your_old_docker> /bin/bash
  2. install your lib
  3. open another shell, and run “$ docker ps” to check the container id
  4. $ docker commit <container_id> <your_new_docker_name>
  5. then, you will find your new docker via “$ docker images”

Thank you