致命:目的地路径'/ home / ipy / ipynotebooks / soccer'已经存在且不是空目录

时间:2015-07-16 17:36:45

标签: python git docker ipython

我试图从Google重现project to predict the results of the 2014 world cup。 (ipython-soccer预测)

我正在浏览该链接的“如何部署”部分。在这条线出现之前,一切都是正常的

sudo docker run -p 8888:8888 fhoffa/ipython-predictions:v1 

运行此代码会给我以下结果

2015-07-16 17:00:24,514 INFO spawned: 'sshd' with pid 10
2015-07-16 17:00:24,516 INFO spawned: 'gitpull-predictions' with pid 11
2015-07-16 17:00:25,420 INFO exited: gitpull-predictions (exit status 0; not expected)
2015-07-16 17:00:26,422 INFO success: ipython entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-07-16 17:00:26,422 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-07-16 17:00:26,424 INFO spawned: 'gitpull-predictions' with pid 23
2015-07-16 17:00:26,429 INFO exited: gitpull-predictions (exit status 128; not expected)
2015-07-16 17:00:28,433 INFO spawned: 'gitpull-predictions' with pid 24
2015-07-16 17:00:28,441 INFO exited: gitpull-predictions (exit status 128; not expected)
2015-07-16 17:00:31,447 INFO spawned: 'gitpull-predictions' with pid 25
2015-07-16 17:00:31,452 INFO exited: gitpull-predictions (exit status 128; not expected)
2015-07-16 17:00:32,453 INFO gave up: gitpull-predictions entered FATAL state, too many start retries too quickly

所以我认为这个问题与gitpull-predictions有关。然后我查看了名为gitpull-predictions-stderr---supervisor-KmqU8Z.log的日志文件,其中包含:

fatal: destination path '/home/ipy/ipynotebooks/soccer' already exists and is not an empty directory.
fatal: destination path '/home/ipy/ipynotebooks/soccer' already exists and is not an empty directory.
fatal: destination path '/home/ipy/ipynotebooks/soccer' already exists and is not an empty directory.

在运行/home/ipy/ipynotebooks/soccer之前,目录docker run不存在,但是运行代码会出现此错误。

然后我查找名为'supervisord-extra.conf'的配置文件。 在这个文件中它说

[program:gitpull-predictions]
command=/usr/bin/git clone https://github.com/GoogleCloudPlatform/ipython-soccer-predictions.git /home/ipy/ipynotebooks/soccer

所以我认为这个'gitpull-predictions'从给出/ home / ipy / ipynotebooks / soccer目录的地址做'git clone'。但我认为这个命令'git clone'不仅运行了一次,而且甚至在它将文件克隆到目录后很多次。因此'/ home / ipy / ipynotebooks / soccer'在'docker run'命令之后存在,但随后'git clone'运行多次给出'致命目的地'错误。

接下来我做的是编辑配置文件,如下面的

[program:gitpull-predictions]
startsecs = 0
autorestart = false
command=/usr/bin/git clone https://github.com/GoogleCloudPlatform/ipython-soccer-predictions.git /home/ipy/ipynotebooks/soccer

我添加了这两行,startsecs = 0和autorestart = false。 当我再次运行'docker run'时,消息显示

2015-07-16 18:50:43,258 CRIT Supervisor running as root (no user in config file)
2015-07-16 18:50:43,259 WARN Included extra file "/etc/supervisor/conf.d/supervisord-ssh.conf" during parsing
2015-07-16 18:50:43,259 WARN Included extra file "/etc/supervisor/conf.d/supervisord-extra.conf" during parsing
2015-07-16 18:50:43,259 WARN Included extra file "/etc/supervisor/conf.d/supervisord-ipython.conf" during parsing
2015-07-16 18:50:43,284 INFO RPC interface 'supervisor' initialized
2015-07-16 18:50:43,284 CRIT Server 'inet_http_server' running without any HTTP authentication checking
2015-07-16 18:50:43,285 INFO RPC interface 'supervisor' initialized
2015-07-16 18:50:43,285 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-07-16 18:50:43,286 INFO supervisord started with pid 1
2015-07-16 18:50:44,288 INFO spawned: 'ipython' with pid 11
2015-07-16 18:50:44,290 INFO spawned: 'sshd' with pid 12
2015-07-16 18:50:44,291 INFO spawned: 'gitpull-predictions' with pid 13
2015-07-16 18:50:44,304 INFO success: gitpull-predictions entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2015-07-16 18:50:45,204 INFO exited: gitpull-predictions (exit status 0; expected)
2015-07-16 18:50:46,205 INFO success: ipython entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2015-07-16 18:50:46,206 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

还有gitpull-predictions退出(未预料到) 然后我查看了显示的错误日志

Cloning into 'ipython-soccer-predictions'...

仍然没有成功运行。有什么解决方案吗? 我开始想知道为什么'git clone'用于名为'gitpull'的程序。该计划的名称应该是'gitclone'......

0 个答案:

没有答案