首页 > 其他 > 详细

docker下使用caffe的命令记录

时间:2016-03-03 06:48:05      阅读:318      评论:0      收藏:0      [点我收藏+]
  • 查看所有的images
sudo docker images

技术分享

  • 利用某个image生成container
    sudo docker run -it --net=host -v /home/tingting/Dropbox/code/craterDetection/docker:/root/workspace tingting/caffe:version1 bash

技术分享

  • 打开jupyter notebook

jupyter notebook

技术分享

在浏览器中输入:localhost:8890

这里一定要注意,有时因为打开多个containers,新的container的jupyter notebook的接口是不同的,之前因为以为所有的接口窦唯8888,所以直接输入了8888,但其实这样打开的是8888那个接口对应的container

  • 将prototxt文件生成网络结构图
# Load the module
import caffe
import caffe.draw
from caffe.proto import caffe_pb2
from google.protobuf import text_format

# Set the parameters
input_net_proto_file = test_net.prototxt# net configuration file
output_image_file =test_net.jpg# the output image
rankdir =LR# net arrange method: LR、TB、RL

# Read the net
net = caffe_pb2.NetParameter()
text_format.Merge(open(input_net_proto_file).read(), net)

# Draw the net
print(Drawing net to %s‘ % output_image_file)
caffe.draw.draw_net_to_file(net, output_image_file, rankdir)
print(done...‘) 
  •  利用一个新的terminal打开正在运行的container

# watch the containers which are running

sudo dockers ps

# go into one conainer

sudo docker exec -it sharp_ardinghelli bash

技术分享

技术分享

docker下使用caffe的命令记录

原文:http://www.cnblogs.com/lutingting/p/5237158.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!