A Dockerfile template which works with nvidia-docker. Dockerfile is created in same directory as requirements.txt

Create Dockerfile in directory with requirements.txt 

FROM tensorflow/tensorflow:2.3.0-gpu-jupyter
RUN mkdir /tf/project
WORKDIR /tf/project
ADD requirements.txt .
RUN pip install -r requirements.txt

In terminal, run

docker build -t projectgroup/project . 

To run:

docker run -p 8888:8888 --gpus all -v ${PWD}:/tf/project projectgroup/project