Quickly install the tensorflow environment in Docker and use TensorFlow. 1. Download the TensorFlow image docker pull tensorflow/tensorflow 2. Create a TensorFlow container docker run --name corwien-tensortflow -it -p 8888:8888 -v /Users/kaiyiwang/Code/ai/notebooks:/notebooks/data tensorflow/tensorflow Command Description
Execute the above command: We can see that the TensorFlow container is created and a default login page for JupiterNotebook is given. We can use the following command to view the executing container and the corresponding mapping port of the container in a new command window: docker ps 3. Open the TensorFlow container 1. You can right-click to open the connection directly from the command line, or enter 4. Start TensorFlow Programming 1. Click to log in and you can see the interface, and you can create a new project 2. Interpretation of tensorflow example source code from __future__ import print_function #Import tensorflow import tensorflow as tf # Input two arrays, input1 and input2, then add them together and output the result with tf.Session(): input1 = tf.constant([1.0, 1.0, 1.0, 1.0]) input2 = tf.constant([2.0, 2.0, 2.0, 2.0]) output = tf.add(input1, input2) result = output.eval() print("result: ", result) 3. Run the program, and the output result is (run successfully) 5. Related commands 1. Close or open the TensorFlow environment #Shut down the tensorflow container docker stop corwien-tensortflow #Start the TensorFlow container docker start corwien-tensortflow #Enter http://localhost:8888/ in the browser 2. Modify the read and write permissions of the file # Check read and write permissions ls -l #Change tensorflow to belong to corwien (system default) user sudo chown -R corwien tensorflow/ #Change tensorflow to belong to the corwien (system default) user group sudo chgrp -R corwien tensorflow/ The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: MySQL 5.7.17 latest installation tutorial with pictures and text
>>: Open the app on the h5 side in vue (determine whether it is Android or Apple)
1. Introduction Elasticsearch is very popular now...
1. Check the software installation path: There is...
yum or rpm? The yum installation method is very c...
1. MacVlan There are many solutions to achieve cr...
The two parameters innodb_flush_log_at_trx_commit...
This morning I planned to use Wampserver to build...
MySQL 8.0 compressed package installation method,...
Google China has released a translation tool that ...
When using VMware Workstation to open a virtual m...
Table of contents MySQL result sorting - Aggregat...
1. Packetdrill compilation and installation Sourc...
How to reset the initial value of the auto-increm...
Passive Check With passive health checks, NGINX a...
During the project optimization today, MySQL had ...
This article records the installation and configu...