通过容器提交镜像(docker commit)以及推送镜像(docker push)笔记

Docker 镜像推送到远程仓库 1. **网络限制**:如果目标服务器没有网络连接,推荐使用方法 2(导出镜像文件)。2. **权限问题**:确保目标服务器上有足够的权限运行 `docker` 命令。3. **镜像大小**:大镜像可能需要较长时间传输,建议压缩后再传输。### **方法 3:直接从源服务器复制镜像到目标服务器**### **方法 2:导出镜像并传输到目标服务器**#### **步骤 2:通过管道传输到目标服务器**#### **步骤 4:在目标服务器拉取镜像**#### **步骤 1:在源服务器导出镜像** 阅读详情

在本地创建一个容器后,可以依据这个容器创建本地镜像,并可把这个镜像推送到Docker hub中,以便在网络上下载使用。

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

查看镜像

[root@docker-test1 ~]# docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

docker.io/ubuntu    16.04               7aa3602ab41e        5 weeks ago         115 MB

 

创建一个名为myubuntu的容器

[root@docker-test1 ~]# docker run -ti --name myubuntu -d docker.io/ubuntu

[root@docker-test1 ~]# docker ps

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

651a8541a47d        docker.io/ubuntu    "/bin/bash"         37 seconds ago      Up 36 seconds                           myubuntu

 

 

docker commit :从容器创建一个新的镜像。

# docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

-a :提交的镜像作者;

-c :使用Dockerfile指令来创建镜像;

-m :提交时的说明文字;

-p :在commit时,将容器暂停。

 

根据这个myubuntu容器提交镜像

[root@docker-test1 ~]# docker commit -a "wangshibo" -m "this is test" 651a8541a47d myubuntu:v1

sha256:6ce4aedd12cda693d0bbb857cc443a56f9f569106e09ec61aa53563d0932ea4d

 

再次查看镜像,发现镜像myubuntu:v1已经提交到本地了

[root@docker-test1 ~]# docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

myubuntu            v1                  6ce4aedd12cd        59 seconds ago      84.1 MB

docker.io/ubuntu    16.04               7aa3602ab41e        5 weeks ago         115 MB

 

在mybuntu:v1镜像推送到docker hub仓库中去

# docker push [OPTIONS] NAME[:TAG]

OPTIONS说明:

--disable-content-trust :忽略镜像的校验,默认开启

 

 

首先是登录docker hub (用户名:wangshibo    密码:*******)

[root@docker-test1 ~]# docker login

Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.

Username (wangshibo): wangshibo

Password:

Login Succeeded

 

[root@docker-test1 ~]# docker push wangshibo/myubuntu:v1

The push refers to a repository [docker.io/wangshibo/myubuntu]

An image does not exist locally with the tag: docker.io/wangshibo/myubuntu

 

这里需要将ubuntu:v1镜像改名,在名称前加上自己的docker hub的Docker ID,即wangshibo

 

[root@docker-test1 ~]# docker tag 6ce4aedd12cd wangshibo/myubuntu:v1

[root@docker-test1 ~]# docker images

REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE

myubuntu             v1                  6ce4aedd12cd        6 minutes ago       84.1 MB

wangshibo/myubuntu   v1                  6ce4aedd12cd        6 minutes ago       84.1 MB

docker.io/ubuntu     16.04               7aa3602ab41e        5 weeks ago         115 MB

 

再次进行推送(注意:下面的v1的tag标签可以不打,默认是latest)。推送操作时间稍微会有一点长,耐心等待~

[root@docker-test1 ~]# docker push wangshibo/myubuntu:v1           

The push refers to a repository [docker.io/wangshibo/myubuntu]

b5948ba9486d: Pushed

8d7ea83e3c62: Mounted from library/ubuntu

6a061ee02432: Mounted from library/ubuntu

f73b2816c52a: Mounted from library/ubuntu

6267b420796f: Mounted from library/ubuntu

a30b835850bf: Mounted from library/ubuntu

v1: digest: sha256:e9cd9075d262848a307c92751e1a5890d883b814a31abd118161442461a1ca2d size: 1564

 

最后登录自己的Docker Hub,即https://hub.docker.com/

登录后,在Repositories里面就可以看到自己在上面推送的镜像wangshibo/myubuntu:v1了,这是个对外的镜像,可以在网络上下载。

在Docker hub上可以看到这个镜像的下载命令(注意下载时跟上tag标签,如果是latest的默认tag可以不跟)

也可以直接在Docker hub上删除这个镜像(Repositories-镜像-Settings-delete)

 

 

比如在另一台服务器上下载这个镜像

[root@kevin-test ~]# docker pull wangshibo/myubuntu

Pulling repository wangshibo/myubuntu

Repository not found

 

需要跟上tag标签

[root@kevin-test ~]# docker pull wangshibo/myubuntu:v1

v1: Pulling from wangshibo/myubuntu

68e2a091ef24: Pull complete

8f9dd35f6299: Pull complete

a81a6171600b: Pull complete

a211a2bc7010: Pull complete

9e71a0b4f83a: Pull complete

0cf75bb335aa: Pull complete

c393a882769e: Pull complete

Digest: sha256:845fa3dcc9d0de1b9c701e1009918995da35a29012015f6c297a05edc489e018

Status: Downloaded newer image for wangshibo/myubuntu:v1

[root@kevin-test ~]# docker  images

REPOSITORY           TAG                 IMAGE ID            CREATED             VIRTUAL SIZE

wangshibo/myubuntu   v1                  c393a882769e        12 minutes ago      84.11 MB

 

 

在本机删除这个镜像

[root@docker-test1 ~]# docker images

REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE

myubuntu             v1                  6ce4aedd12cd        15 minutes ago      84.1 MB

wangshibo/myubuntu   v1                  6ce4aedd12cd        15 minutes ago      84.1 MB

docker.io/ubuntu     16.04               7aa3602ab41e        5 weeks ago         115 MB

 

注意上面有两个6ce4aedd12cd的镜像ID,此时直接使用这个镜像ID是删除不掉的

[root@docker-test1 ~]# docker rmi 6ce4aedd12cd

Error response from daemon: conflict: unable to delete 6ce4aedd12cd (must be forced) - image is referenced in multiple repositories

 

应该先删除docker tag改名前的镜像,使用镜像名称删除。(一般在docker tag镜像改名后,最好删除改名前的镜像)

[root@docker-test1 ~]# docker rmi myubuntu:v1

Untagged: myubuntu:v1

Untagged: wangshibo/myubuntu@sha256:e9cd9075d262848a307c92751e1a5890d883b814a31abd118161442461a1ca2d

 

[root@docker-test1 ~]# docker images

REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE

wangshibo/myubuntu   v1                  6ce4aedd12cd        15 minutes ago      84.1 MB

docker.io/ubuntu     16.04               7aa3602ab41e        5 weeks ago         115 MB

 

这个时候就可以删除镜像ID删除了

[root@docker-test1 ~]# docker rmi 6ce4aedd12cd

Untagged: wangshibo/myubuntu:v1

Deleted: sha256:6ce4aedd12cda693d0bbb857cc443a56f9f569106e09ec61aa53563d0932ea4d

Deleted: sha256:0ddeb6a16badd042914c2e72b9ef0331550c1cdcc4bdc6650a90cd9f57f1501b

[root@docker-test1 ~]# docker images         

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

docker.io/ubuntu    16.04               7aa3602ab41e        5 weeks ago         115 MB

docker创建一个多平台运行的镜像,并推送到远程的镜像仓库 阅读详情

相关推荐

idea配置docker推送本地镜像到远程私有仓库

安装docker私有仓库 idea配置docker 本地拉取远程私有仓库中的镜像

原名又逢乱世。不要放下学习的脚步,毕竟比天天打牌、钓鱼、打游戏更能从内在充实自己。 4823

【Docker】将本地镜像推送到远程库/私有库

将本地镜像推送到阿里云和私有库的方法。区别,一个是存放到阿里云,同一个团队可以登录到同一个阿里云仓库,去拉取镜像。一个是存放到本地私有库,同一个团队可以连接同一个私有库,去拉取镜像。例如,有重要机密东西不想放到阿里云仍然可以进行协调工作。

weixin_55519875的博客 5174

Docker (二):镜像、容器导入导出与私有仓库搭建

🟢 Docker (二):镜像、容器导入导出与私有仓库搭建

✨ 欢迎来到【Seal ^_^ 的CSDN博客】!✨ 5万+

将docker本地镜像上传远程dockerhub仓库

将docker本地镜像上传远程dockerhub仓库,实现在其他设备上无需建立dockerfile文件来制作镜像。

balabala_333的博客 2531

GPIB通讯的代码怎么写

GPIB(General Purpose Interface Bus)是一种用于连接计算机和测试设备的接口标准。 在写 GPIB 通讯的代码时,首先需要在计算机上安装 GPIB 驱动程序。然后,使用相应的编程语言和 GPIB 库函数来操作 GPIB 设备。 下面是一个使用 Python 语言和 pyvisa 库来实现 GPIB 通讯的示例代码: import visa# 创建 Visa 资源管理器...

weixin_35752645的博客 1551

台积电技术研发实力

台积电技术研发实力 台积电在半导体行业的地位毋庸置疑。他们究竟有多强大,大部分读者了解得可能非常片面。从最新公布的2019年财报里,看看台积电的真正实力。 一、台积电在市场上的地位 根据公司财报,台积公司在先进制程技术、特殊制程技术,以及先进封装技术的发展上持续领先全球集成电路制造服务领域,2019年的市场占有率为52%。台积公司总体营收以地区划分(主要依据客户营运总部所在地),来自北美市场的营收占台积公司总体营收的60%、日本与中国大陆以外的亚太市场占9%、中国大陆市场占20%、欧洲、中东及非洲市场占6

吴建明wujianming_110117 1911

Docker通过容器生成镜像(通过容器提交(docker commit)成镜像)

在本地创建一个容器后,可以依据这个容器创建本地镜像,并可把这个镜像推送到Docker hub中。 目录 根据镜像启动容器:docker run 根据启动的容器创建新的镜像:docker commit 将由容器生成的镜像push到镜像仓库docker hub 在另一台服务器下载上图push到镜像仓库的新镜像 根据镜像启动容器:docker run ...

捕影世界 1万+

Arduino应用——PWM控制直流电机风扇

Arduino应用——PWM控制直流电机风扇PWM原理实验器件功能描述如何改变文本的样式插入链接与图片实现代码生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入 最近在使用arduino UNO开发板完成课程小作业。其中一个要求设计一个电风扇控制系统,要求能够通过PWM调节风扇的转速。期间搜索了许多例程和方法,但受限于器件,效果不

hypecycle的博客 2万+

通过容器提交镜像(docker commit)以及推送镜像(docker push)

在本地创建一个容器后,可以依据这个容器创建本地镜像,并可把这个镜像推送到Docker hub中,以便在网络上下载使用。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...

weixin_39891030的博客 1958

物理信息神经网络(PINN)文献综述 —— 原理、严格推导与优化训练策略

本章系统阐述物理信息神经网络的理论基础、主要算法改进与训练策略。内容涵盖:PINN 的数学表述与残差构造;损失与梯度的逐步推导;训练困难(梯度消失/爆炸、损失幅度不平衡、频谱偏差、采样效率低等)的定量分析;四类核心解决方案(动态损失加权、梯度归一化与预条件化、自适应采样、分阶段/分域训练)的详细推导与实现要点;以及若干关键算法的伪代码与收敛性形式结论。所有涉及推导的步骤均按顺序展开,给出必要的数学依据与结论性陈述,可直接作为教学或参考章节使用。

u012133341的博客 425

SAP_通用模块-MASS批量操作技巧

SAP_MM模块-MASS/MM17批量更新主数据详细教程

风沙的博客 2174

Docker(五)通过容器提交镜像(docker commit)、推送镜像(docker push)、拉镜像(docker pull)

容器提交镜像(docker commit) docker commit :从容器创建一个新的镜像。 # docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] -a :提交的镜像作者; -c :使用Dockerfile指令来创建镜像; -m :提交时的说明文字; -p :在commit时,将容器暂停。 根据这个myubuntu容器提交镜像 [root@docker-test1 ~]# docker commit -a "wangshibo"

凝眸伏笔的博客 4355

手把手教你学veriolg(二十六)-- Verilog CIC 滤波器设计

目录 Verilog CIC 滤波器设计1. CIC 滤波器的基本原理2. Verilog 实现3. 说明4. 测试激励5. 总结 CIC(Cascade-Integrator-Comb)滤波器是一种特殊的数字滤波器,常用于多速率信号处理中,尤其是用于信号的上采样(插值)和下采样(抽取)。CIC 滤波器的特点在于它具有简单的硬件实现、不需要乘法器(仅使用加法器和延迟元件)、且具有线性相位特性。然而,CIC 滤波器的缺点是它会产生较大的量化误差,因此在设计时需要特别注意字长的选择以避免溢出。1. CIC 滤波

MHD0815的博客 895

docker镜像制作、推送(push)到 Docker Hub、迁移

一、利用 commit 制作镜像 docker commit 语法 docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]] Options: -a :提交的镜像作者; -c :使用Dockerfile指令来创建镜像; -m :提交时的说明文字; -p :在commit时,将容器暂停 1、在公有镜像拉取(pull)镜像模板 [root@localh...

叫我酋长好吧 3063

AgentScope 2.0 API完全指南:构建企业级AI智能体应用的技术实践

本文系统梳理AgentScope 2.0框架的完整API体系,涵盖智能体核心引擎、统一模型适配层、工具系统、消息协议、权限控制与工作空间管理等七大核心模块。通过深入的源码级分析与架构图示,详细解读Agent类的推理-行动循环、ChatModelBase的多模型抽象、Toolkit的工具管理机制、ContentBlock的多模态内容表达、PermissionEngine的安全决策流程,以及Local/Docker/E2B三种工作空间实现。文章还提供了智能客服系统的完整实战案例,展示从自定义工具开发到流式服务部

program哲学 491

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

docker提交容器成一个新的镜像commit和push,以及docker常用命令

docker自己提交配置好的容器,然后生成一个新的镜像,以后启动就以配置好的镜像作为模板启动 代码如下: docker commit -a "author" -m "commit message" 容器id namespace/name:tag 如果想把镜像推到仓库里面去: --本地镜像素材原型,本地的images --登录阿里云开发者平台,进入之后搜索容器镜像服务,即可进入阿里云...

Buggggggg 3437

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

Docker学习(八)docker镜像的commit与push

http://www.chendd.cn/information/viewInformation/experienceShare/297.a 截至目前为止已经涉及到好几个镜像和容器了,现在要将一个已经修改过配置的tomcat的docker容器给提交生成一款新的镜像,并且这个镜像可以推送至阿里云服务器上,后续再拉取的时候直接拉取自己的镜像。相关的docker命令分别为commit与push。 将...

haiyangyiba的专栏 5886

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

docker学习(三):docker镜像分层原理及本地镜像推送到阿里云或私服

大家好,这是我学习docker系列的笔记文章,本文记录了docker镜像分层加载的原理,及如何把本地镜像推送到阿里云服务器或者本地私服 ,感兴趣的朋友可以看一下以前的文章。

java后端开发的博客,不仅仅是后端开发 4075
上一篇: Docker容器内部端口映射到外部宿主机端口的方法小结
下一篇: k8s etcd
mnasd
博客等级 码龄16年 242粉丝 120原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值