From ee59d109373e1417460e10227692548698bbcac7 Mon Sep 17 00:00:00 2001 From: liaogang Date: Tue, 17 Jan 2017 21:08:02 +0800 Subject: [PATCH] Add gfortran in docker --- .../build_and_install/build_from_source_en.md | 17 +++++++++++------ paddle/scripts/docker/Dockerfile | 2 +- paddle/scripts/docker/Dockerfile.gpu | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/doc/getstarted/build_and_install/build_from_source_en.md b/doc/getstarted/build_and_install/build_from_source_en.md index 6cd2183f48..fbca407030 100644 --- a/doc/getstarted/build_and_install/build_from_source_en.md +++ b/doc/getstarted/build_and_install/build_from_source_en.md @@ -16,7 +16,7 @@ cd paddle To compile the source code, your computer must be equipped with the following dependencies. -- **Compiler**: GCC >= 4.8 or Clang >= 3.3 (AppleClang >= 5.1) +- **Compiler**: GCC >= 4.8 or Clang >= 3.3 (AppleClang >= 5.1) and gfortran compiler - **CMake**: CMake >= 3.0 (at least CMake 3.4 on Mac OS X) - **BLAS**: MKL, OpenBlas or ATLAS - **Python**: only support Python 2.7 @@ -96,16 +96,21 @@ As a simple example, consider the following: ### Install Dependencies -- **CPU Dependencies** +- **Paddle Dependencies** ```bash # necessary sudo apt-get update - sudo apt-get install -y g++ make cmake build-essential python python-pip python-numpy libpython-dev git - sudo pip install wheel - sudo pip install 'protobuf>=3.0.0' + sudo apt-get install -y git curl gcc g++ gfortran make build-essential + sudo apt-get install -y python python-pip python-numpy libpython-dev + sudo pip install 'protobuf==3.1.0.post1' + + # install cmake 3.4 + curl -sSL https://cmake.org/files/v3.4/cmake-3.4.1.tar.gz | tar -xz && \ + cd cmake-3.4.1 && ./bootstrap && make -j4 && sudo make install && \ + cd .. && rm -rf cmake-3.4.1 ``` - + - **GPU Dependencies (optional)** To build GPU version, you will need the following installed: diff --git a/paddle/scripts/docker/Dockerfile b/paddle/scripts/docker/Dockerfile index 28d7696c8c..127ebf26c2 100644 --- a/paddle/scripts/docker/Dockerfile +++ b/paddle/scripts/docker/Dockerfile @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y git python-pip python-dev openssh-server && \ apt-get install -y wget unzip tar xz-utils bzip2 gzip coreutils && \ apt-get install -y curl sed grep graphviz libjpeg-dev zlib1g-dev && \ - apt-get install -y python-numpy python-matplotlib g++ && \ + apt-get install -y python-numpy python-matplotlib gcc g++ gfortran && \ apt-get clean -y RUN pip install --upgrade pip && \ diff --git a/paddle/scripts/docker/Dockerfile.gpu b/paddle/scripts/docker/Dockerfile.gpu index b1344f275b..a729e33d46 100644 --- a/paddle/scripts/docker/Dockerfile.gpu +++ b/paddle/scripts/docker/Dockerfile.gpu @@ -9,7 +9,7 @@ RUN apt-get update && \ apt-get install -y git python-pip python-dev openssh-server && \ apt-get install -y wget unzip tar xz-utils bzip2 gzip coreutils && \ apt-get install -y curl sed grep graphviz libjpeg-dev zlib1g-dev && \ - apt-get install -y python-numpy python-matplotlib g++ && \ + apt-get install -y python-numpy python-matplotlib gcc g++ gfortran && \ apt-get clean -y RUN pip install --upgrade pip && \ -- GitLab