Docker - apt-get安装失败(Docker - apt-get install fail)
我有一个非常容易的码头 - 撰写/码头同步脚本:
搬运工-撰写-dev.yml
# this is our development docker-compose building on top of the production docker-compose, just mounting # the sync image - not redefining anything else version: "2" services: apache: volumes: - ./docker-config/vhost:/etc/apache2/sites-enabled/000-default.conf - jettsw53-sync:/var/www/html:nocopy # nocopy is important # that the important thing volumes: jettsw53-sync: external: true
泊坞窗,compose.yml
version: '2' services: apache: build: . ports: - 80:80 db: image: orchardup/mysql ports: - 3306:3306 environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: jettsw53
Dockerfile
FROM bylexus/apache-php7 RUN apt-get update && \ apt-get install -y \ curl \ vim CMD ["/usr/local/bin/run"]
泊坞窗,sync.yml
version: "2" options: verbose: true syncs: jettsw53-sync: # tip: add -sync and you keep consistent names as a convention src: './src' sync_excludes: ['.git', 'var/cache/*']
当我启动这个设置时,运行apt-get install时出现这个错误:
Building apache Step 1/3 : FROM bylexus/apache-php7 ---> 97d3e723b95a Step 2/3 : RUN apt-get update && apt-get install -y curl vim ---> Running in ae4aa07c3b4f Ign:1 http://security.ubuntu.com/ubuntu yakkety-security InRelease Ign:2 http://archive.ubuntu.com/ubuntu yakkety InRelease Err:3 http://security.ubuntu.com/ubuntu yakkety-security Release 404 Not Found [IP: 91.189.88.161 80] Ign:4 http://archive.ubuntu.com/ubuntu yakkety-updates InRelease Ign:5 http://archive.ubuntu.com/ubuntu yakkety-backports InRelease Err:6 http://archive.ubuntu.com/ubuntu yakkety Release 404 Not Found [IP: 91.189.88.152 80] Err:7 http://archive.ubuntu.com/ubuntu yakkety-updates Release 404 Not Found [IP: 91.189.88.152 80] Err:8 http://archive.ubuntu.com/ubuntu yakkety-backports Release 404 Not Found [IP: 91.189.88.152 80] Reading package lists... E: The repository 'http://security.ubuntu.com/ubuntu yakkety-security Release' does no longer have a Release file. E: The repository 'http://archive.ubuntu.com/ubuntu yakkety Release' does no longer have a Release file. E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-updates Release' does no longer have a Release file. E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-backports Release' does no longer have a Release file. Service 'apache' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y curl vim' returned a non-zero code: 100 EXCEPTION: #<Docker::Compose::Error: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7> MESSAGE: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7
有人知道这里发生了什么,我该如何解决?
I have a pretty easy docker-compose/docker-sync script:
docker-compose-dev.yml
# this is our development docker-compose building on top of the production docker-compose, just mounting # the sync image - not redefining anything else version: "2" services: apache: volumes: - ./docker-config/vhost:/etc/apache2/sites-enabled/000-default.conf - jettsw53-sync:/var/www/html:nocopy # nocopy is important # that the important thing volumes: jettsw53-sync: external: true
docker-compose.yml
version: '2' services: apache: build: . ports: - 80:80 db: image: orchardup/mysql ports: - 3306:3306 environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: jettsw53
Dockerfile
FROM bylexus/apache-php7 RUN apt-get update && \ apt-get install -y \ curl \ vim CMD ["/usr/local/bin/run"]
docker-sync.yml
version: "2" options: verbose: true syncs: jettsw53-sync: # tip: add -sync and you keep consistent names as a convention src: './src' sync_excludes: ['.git', 'var/cache/*']
When I start this setup, I get this error when running apt-get install:
Building apache Step 1/3 : FROM bylexus/apache-php7 ---> 97d3e723b95a Step 2/3 : RUN apt-get update && apt-get install -y curl vim ---> Running in ae4aa07c3b4f Ign:1 http://security.ubuntu.com/ubuntu yakkety-security InRelease Ign:2 http://archive.ubuntu.com/ubuntu yakkety InRelease Err:3 http://security.ubuntu.com/ubuntu yakkety-security Release 404 Not Found [IP: 91.189.88.161 80] Ign:4 http://archive.ubuntu.com/ubuntu yakkety-updates InRelease Ign:5 http://archive.ubuntu.com/ubuntu yakkety-backports InRelease Err:6 http://archive.ubuntu.com/ubuntu yakkety Release 404 Not Found [IP: 91.189.88.152 80] Err:7 http://archive.ubuntu.com/ubuntu yakkety-updates Release 404 Not Found [IP: 91.189.88.152 80] Err:8 http://archive.ubuntu.com/ubuntu yakkety-backports Release 404 Not Found [IP: 91.189.88.152 80] Reading package lists... E: The repository 'http://security.ubuntu.com/ubuntu yakkety-security Release' does no longer have a Release file. E: The repository 'http://archive.ubuntu.com/ubuntu yakkety Release' does no longer have a Release file. E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-updates Release' does no longer have a Release file. E: The repository 'http://archive.ubuntu.com/ubuntu yakkety-backports Release' does no longer have a Release file. Service 'apache' failed to build: The command '/bin/sh -c apt-get update && apt-get install -y curl vim' returned a non-zero code: 100 EXCEPTION: #<Docker::Compose::Error: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7> MESSAGE: 'up' failed with status 'pid 40288 exit 1': Step 1/3 : FROM bylexus/apache-php7
Does anybody know what is happening here and how can I solve it?
原文:https://stackoverflow.com/questions/48734243
最满意答案
您可以在http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf (等式11)的第4页上下文中看到该公式。 在那篇论文中,他们使用F作为强度,我假设你有。因为你的强度是标量,你只想取其差异的平方。
您想要计算一个权重矩阵,用于计算A中任何条目与A中任何其他条目的亲和力。因为您的A有25个条目,所以您的权重矩阵将为25x25。
因为你只关心亮度这很容易:
len = length(A(:)); W = zeros(len); for i = 1:len for j = 1:len W(i,j) = (A(i) - A(j))^2; end end
现在,如果你想查看A(1,1)和A(1,2)之间的权重,你可以这样做:
i = sub2ind(size(A), 1, 1) j = sub2ind(size(A), 1, 2) W(i, j)
但是如果你设置r = 1(根据NCuts公式)那么你可能想要这样的东西:
sigma= 10; r = 1; A = magic(3); siz = size(A); len = length(A(:)); W = zeros(len); for i = 1:len for j = 1:len [xi,yi] = ind2sub(siz,i); [xj,yj] = ind2sub(siz,j); if((xi-xj)^2 + (yi-yj)^2) > r^2 W(i,j) = 0; else W(i,j) = exp(-(A(i) - A(j))^2 / sigma^2); end end end A11 = sub2ind(siz, 1, 1) A12 = sub2ind(siz, 1, 2) W(A11, A12)
You can see that formula in context on page 4 of http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf (equation 11). In that paper they use F for intensity where I assume you have I. Since your intensities are scalars, you just want to take the square of their differences.
You want to calculate a weight matrix that calculates the affinity of any entry in A to any other entry in A. Because your A has 25 entries, your weight matrix will be 25x25.
Since you are only worried about the brightness this is easy:
len = length(A(:)); W = zeros(len); for i = 1:len for j = 1:len W(i,j) = (A(i) - A(j))^2; end end
Now if you want to look up the weight between A(1,1) and A(1,2) you can do it like this:
i = sub2ind(size(A), 1, 1) j = sub2ind(size(A), 1, 2) W(i, j)
But if you set r=1 (according to the NCuts formula) then you might want something like this:
sigma= 10; r = 1; A = magic(3); siz = size(A); len = length(A(:)); W = zeros(len); for i = 1:len for j = 1:len [xi,yi] = ind2sub(siz,i); [xj,yj] = ind2sub(siz,j); if((xi-xj)^2 + (yi-yj)^2) > r^2 W(i,j) = 0; else W(i,j) = exp(-(A(i) - A(j))^2 / sigma^2); end end end A11 = sub2ind(siz, 1, 1) A12 = sub2ind(siz, 1, 2) W(A11, A12)
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
这听起来像一个问题,即使使用GPU的基本暴力实施也会带来很好的改善。 所以我试了一下。 而且改善非常好。 我使用pyopencl进行了测试。 import pyopencl as cl import numpy as np def findDistances_cl(imageSize, points): #Boilerplate opencl code ctx = cl.create_some_context() queue = cl.CommandQueue(ctx) ...
-
正如卡尔所建议的那样,使用apply系列函数可以加快计算速度 ??apply 您可能还想查看并行处理 As Carl suggests, using the apply family of functions may speed up calculations ??apply You may also want to look in to parallel processing
-
您可以在http://www.cs.berkeley.edu/~malik/papers/SM-ncut.pdf (等式11)的第4页上下文中看到该公式。 在那篇论文中,他们使用F作为强度,我假设你有。因为你的强度是标量,你只想取其差异的平方。 您想要计算一个权重矩阵,用于计算A中任何条目与A中任何其他条目的亲和力。因为您的A有25个条目,所以您的权重矩阵将为25x25。 因为你只关心亮度这很容易: len = length(A(:)); W = zeros(len); for i = 1:len ...
-
您的数据不一致 您的坐标与ℝ4中的点位置不一致,更不用说维度较低的空间。 您可以通过计算平方距离矩阵的Menger行列式来说明这一事实: D <- as.matrix(read.table(textConnection("\ 0 73 102 496 432 184 73 0 303 392 436 233 102 303 0 366 207 353 496 392 366 0 172 103 432 436 207 172 0 35 ...
-
您可以使用find来查找所有1's行和列索引,然后使用Statistics and Machine Learning Toolbox pdist2从搜索点(3,2)计算所有1's距离,最后选择这些距离中的最小值以获得最终结果输出。 下面是以示例运行方式显示的实现 - >> image image = 1 0 0 0 0 1 0 0 0 >> point point = 3 2 >> [R,C] = find(im ...
-
如何计算一组结果中2行点之间的距离?(How can I calculate the distance between 2 rows' points in a set of results?)[2024-01-05]
更换 SELECT N,Point.STBuffer(0.25) as point, Point.STAsText() FROM GeographyPoints 同 SELECT * INTO #GeographyPoints FROM GeographyPoints DECLARE @N1 INT = 10 DECLARE @N2 INT = 11 SELECT (SELECT Point FROM #GeographyPoints WHERE N=@N1).STDistance( ... -
您可以使用kd树来存储A的所有点。 迭代B的点b,对于每个点 - 在kd树中找到A中最近的点 (让它成为a)。 当且仅当距离d(a,b)小于r d(a,b)点b应包括在结果中。 复杂性将是O(|B| * log(|A|) + |A|*log(|A|)) You can use a k-d tree to store all points of A. Iterate points b of B, and for each point - find the nearest point in A (let it ...
-
听起来解决方案必须位于(其他)代理的Voronoi图的交叉点之一。 因此,算法解决方案是构造Voronoi图,迭代交叉点,并选择与邻居具有最大最短距离的交叉点。 It sounds like the solution must lie on one of the intersections of the Voronoi diagram for the (other) agents. So an algorithmic solution is to construct the Voronoi diagram, ...