致命的:目的地path“/ home / ipy / ipynotebooks / soccer”已经存在并且不是空目录

我试图复制这个项目来预测 Google 2014年世界杯的结果 。 (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之前,目录/home/ipy/ipynotebooks/soccer不存在,但是运行代码会出现这个错误。

然后我查找了名为“supervisord-extra.conf”的configuration文件。 在这个文件中说

 [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”不仅运行了一次,而且在将文件克隆到目录之后也运行了很多次。 所以在'docker run'命令之后'/ home / ipy / ipynotebooks / soccer'存在,但是'git clone'多次运行这个'致命目的地'的错误。

接下来我做的是编辑如下的configuration文件

 [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运行”消息显示

 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预测退出(不期望)然后我看着显示的错误日志

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

仍然没有成功运行。 有没有解决办法? 我开始想知道为什么'git clone'被用于名为'gitpull'的程序。 程序的名称应该是'gitclone'…