sudo docker images
- Generate container
sudo docker run-it--net=host-v/home/tingting/dropbox/code/craterdetection/docker:/root/with an image Workspace Tingting/caffe:version1 Bash
Jupyter Notebook
In the browser, type: localhost:8890
It is important to note that, sometimes because of the opening of multiple containers, the interface of the new container Jupyter notebook is different, before because of the thought of all the interface sinus only 8888, so the direct input of 8888, But in fact, this opens the 8888 interface corresponding to the container
- To generate a network structure diagram for a prototxt file
#Load the moduleImportCaffeImportCaffe.drawFrom Caffe.protoImportCaffe_pb2From Google.protobufImportText_format#Set the Parametersinput_net_proto_file =‘Test_net.prototxt‘#NET Configuration Fileoutput_image_file =‘Test_net.jpg‘#The Output Imagerankdir = ' lr # net arrange Method:lr, TB, Rl# Read the netnet = Caffe_pb2.netparameter () Text_format. Merge (Open (input_net_proto_file). Read (), net) # Draw The Netprint ( drawing NET to%s '% Output_image_file) caffe.draw.draw_net_to_ File (NET, Output_image_file, Rankdir) print ( "done ...
- Open a running container with a new terminal
# Watch the containers which is running
sudo Dockers PS
# go into one Conainer
sudo docker exec-it Sharp_ardinghelli bash
Command logging using Caffe under Docker