In order to build your own Dockerfile.
For example to use tensorflow module:
# Module import import tensorflow as tf # Use of module def compute_mean(data): func = tf.reduce_mean(data) print(tf.Session().run(func)) # Script if __name__ == '__main__': compute_mean(tf.constant([1, 5, 9, 6, 7])) |
FROM saagie/python:3.5.2-1.3.1-centos RUN pip install tensorflow ADD myapp.py . CMD ['bash', '-c', 'python', 'myapp.py'] |
You can use any of Saagie's public python images as the base image.
The list of Saagie's python images is available: Here
docker build . -t repo/myImage:mytag docker push repo/myImage:mytag |
repo/myImage:mytag |