How to mount the file into Jenkins docker

I’m trying to mount my file(/home/ubuntu/grace/new_project on ubuntu) into Jenkins Docker container and run ‘nvidia-docker’. The directory that I want to copy it is in /var/jenkins_home/new_folder on Docker container.

This is the command to run Jenkins server using docker.

sudo docker run --rm 
-u root -p 8080:8080 
-v jenkins-data:/var/jenkins_home 
-v /var/run/docker.sock:/var/run/docker.sock 
-v "$HOME":/home   jenkinsci/blueocean

And I want to run this command in Jenkins.

sudo nvidia-docker run -d 
-v /home/ubuntu/grace:/notebooks/grace 
-it --name test classification:ver1.2 
sudo nvidia-docker exec -it test python main.py

I expect my project (/home/ubuntu/grace/new_project) is in /var/jenkins_home/new_folder/ on docker container so that I can run ‘nvidia-docker’ to run ‘main.py’.

My ultimate goal is to make Jenkins pipeline to run my project using ‘sudo nvidia-docker exec -it auto python main.py’ from shell script.
Anybody can help me?

Source: StackOverflow