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)
This article example shares the specific code of ...
1. Use xshell to connect to the virtual machine, ...
Table of contents Object Object Definition Iterat...
Basic structure: Copy code The code is as follows:...
Preface: This article mainly introduces the query...
MySQL8.0.22 installation and configuration (super...
Table of contents origin Environmental Informatio...
First of all, I don't know why I can't lo...
1. Command Introduction The file command is used ...
Hello everyone, I wonder if you have the same con...
Note: nginx installed via brew Website root direc...
Table of contents Preface Computed properties Int...
console.log( [] == ![] ) // true console.log( {} ...
The Explain command is the first recommended comm...
Table of contents 1. Environment Configuration 1....