From b48ebd16c833ab5d6036c4ba9e6f897667ba5f33 Mon Sep 17 00:00:00 2001 From: liaogang Date: Thu, 9 Mar 2017 09:51:10 +0800 Subject: [PATCH] Fix git submodule in docker --- paddle/scripts/docker/Dockerfile | 4 ++-- paddle/scripts/docker/Dockerfile.gpu | 4 ++-- paddle/scripts/docker/entrypoint | 8 ++------ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/paddle/scripts/docker/Dockerfile b/paddle/scripts/docker/Dockerfile index fa4aee4f8..6435923c8 100644 --- a/paddle/scripts/docker/Dockerfile +++ b/paddle/scripts/docker/Dockerfile @@ -34,8 +34,6 @@ RUN apt-get update && \ # git credential to skip password typing RUN git config --global credential.helper store -# fetch PaddlePaddle book -RUN git submodule update --init --recursive # Fix locales to en_US.UTF-8 RUN localedef -i en_US -f UTF-8 en_US.UTF-8 @@ -52,7 +50,9 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \ cd .. && rm -rf cmake-3.4.1 COPY . /paddle/ +RUN cd /paddle/ && git submodule update --init --recursive RUN /paddle/paddle/scripts/docker/build.sh + VOLUME ["/usr/share/nginx/html/data", "/usr/share/nginx/html/paddle"] # Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service diff --git a/paddle/scripts/docker/Dockerfile.gpu b/paddle/scripts/docker/Dockerfile.gpu index 07b32dda7..06e53a0ef 100644 --- a/paddle/scripts/docker/Dockerfile.gpu +++ b/paddle/scripts/docker/Dockerfile.gpu @@ -34,8 +34,6 @@ RUN apt-get update && \ # git credential to skip password typing RUN git config --global credential.helper store -# fetch PaddlePaddle book -RUN git submodule update --init --recursive # Fix locales to en_US.UTF-8 RUN localedef -i en_US -f UTF-8 en_US.UTF-8 @@ -52,7 +50,9 @@ RUN curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \ cd .. && rm -rf cmake-3.4.1 COPY . /paddle/ +RUN cd /paddle/ && git submodule update --init --recursive RUN /paddle/paddle/scripts/docker/build.sh + VOLUME ["/usr/share/nginx/html/data", "/usr/share/nginx/html/paddle"] # Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service diff --git a/paddle/scripts/docker/entrypoint b/paddle/scripts/docker/entrypoint index cd119917f..bc194bd90 100755 --- a/paddle/scripts/docker/entrypoint +++ b/paddle/scripts/docker/entrypoint @@ -1,8 +1,4 @@ #!/bin/bash -LOG=/var/log/all -touch $LOG - -/usr/sbin/sshd -D >> $LOG & -jupyter notebook --ip=0.0.0.0 /paddle/book/ >> $LOG & -tail -f $LOG +/usr/sbin/sshd -D & +jupyter notebook --ip=0.0.0.0 /paddle/book/ -- GitLab