Thank you for your comment on --ipc=host or --shm-size.
Regarding your saying
$ docker build -t container_name,
I am confused. By dockerfile docker  build command document, is container_name an image instead of a container ?
Let me explain the history leading up to here.
Firstly, my administrator built an image, original_image, from nvidia hub  for us and I  made my_existing_container_name from that image by
$ docker run -it --gpus all --name my_existing_container_name original_image bash
Then I worked on this container, creating many new applications and data for a while  and then  found that the container needs more shared memory to run a specific program I created.  This initiates the question of this thread.
What I think I must do from now on is;

To do docker commit to make a new image from the current my_existing_container_name by

docker commit my_existing_container_name myrepository:new_image
where myrepository and new_image are names which I can arbitrarily specify

To do docker run for creating a my_new_container_name with a bigger shared memory from myrepository:new_image by

docker run --gpu all --ipc=host --name my_new_container_name  myrepository:new_image bash
Are these right things to do ?
Thank you.
P.S. Even if the above are right things to do, I am another problem. The disk looks short of empty area to do commit because the my_existing_image_name gets too big. It says running up disk space.  I am trying to increase empty disk space by deleting   unnecessary files in the container or in the host.