This repo builds an image with TensorFlow and Conda to be used with the tensorflow-model-pipeline.
tensorflow-mnist-model
is a sample model that can be used to test this image. It is based off of fashion-mnist
- The
Copy Files into container
step expectstensorflow-mnist-model
next toimage-tensorflow-model-train
git clone https://github.com/itg-devops/tensorflow-mnist-model.git
├── image-tensorflow-model-train
└── tensorflow-mnist-model
docker run --name tensorflow-mnist -v containers:/var/lib/containers --rm -it quay.io/ibmtechgarage/tensorflow-model-train
- If you are only running the pre-build image skip to
Copy Files into container
step.
When building this image it's nice to tag it so it's easy to publish to your quay.io account.
Use read to set variable to be used with build, run, and publish steps
read quayusername
docker build -t quay.io/${quayusername}/tensorflow-model-train .
docker run --name tensorflow-mnist -v containers:/var/lib/containers --rm -it quay.io/${quayusername}/tensorflow-model-train
In another terminal copy files from tensorflow-mnist-model
repo into the running tensorflow-mnist
container
docker cp ../tensorflow-mnist-model/environment.yml tensorflow-mnist:/tmp/
docker cp ../tensorflow-mnist-model/preprocessing.py tensorflow-mnist:/tmp/
docker cp ../tensorflow-mnist-model/train.py tensorflow-mnist:/tmp/
docker cp ../tensorflow-mnist-model/constants.py tensorflow-mnist:/tmp/
docker cp build-script.sh tensorflow-mnist:/tmp/
docker exec tensorflow-mnist sh -c ./build-script.sh
- This step only for building this image and you want to push to your Quay account.
docker push quay.io/${quayusername}/tensorflow-model-train