Monday, December 11, 2017

Nvidia-docker build a modifed tensoflow gpu Dockerfile and create a new image references

https://www.pugetsystems.com/labs/hpc/Docker-and-NVIDIA-docker-on-your-workstation-Installation-903/

https://www.pugetsystems.com/labs/hpc/Docker-and-Nvidia-Docker-on-your-workstation-Common-Docker-Commands-Tutorial-926/

Lets say you want to create a user and an application directory in a Dockerfile that uses the latest Tensorflow GPU Docker image.

Check out Al Krauss's helpful create user and directory in a Dockerfile gist
-Thanks Al!

cd ~
git clone https://gist.github.com/alkrauss48/2dd9f9d84ed6ebff9240ccfa49a80662

mkdir nvidia-docker-mod
cp  ../2dd9f9d84ed6ebff9240ccfa49a80662/Dockerfile .

vi Dockerfile and add the following line at the top of the file.

FROM gcr.io/tensorflow/tensorflow:latest-gpu

# save the file

# Build the new Docker image
docker build -t nvidia-docker-mod .

# Run the new Docker image
$ nvidia-docker run -it nvidia-docker-mod   bash
app@3dfedb81f97c:~/my-project$ whoami
app
app@3dfedb81f97c:~/my-project$




No comments:

Post a Comment