From 99f5e78d62ac7faf3c078127c37ba0c8db5bf7e3 Mon Sep 17 00:00:00 2001 From: dolphin8 Date: Tue, 3 Jul 2018 11:56:30 +0800 Subject: [PATCH] fix dockerfile --- CMakeLists.txt | 4 ++++ Dockerfile | 10 +++++++--- tools/toolchains/arm-linux-gnueabi.cmake | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89473e9f32..9baf1981af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,10 @@ option(MALI_GPU "mali gpu" OFF) option(FPGA "fpga" OFF) set(DEBUGING ON) +if (ARM_LINUX) +include("${CMAKE_CURRENT_LIST_DIR}/tools/arm-platform.cmake") +endif () + file(GLOB_RECURSE PADDLE_MOBILE_CC src/*.cc src/*.cpp src/*.c) file(GLOB_RECURSE PADDLE_MOBILE_H src/*.h) diff --git a/Dockerfile b/Dockerfile index 8f54b870d5..df7df032ac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,7 +15,6 @@ RUN apt-get install -y --no-install-recommends \ unzip \ git \ make \ - cmake \ cmake-curses-gui \ python \ python-pip \ @@ -25,9 +24,14 @@ RUN apt-get install -y --no-install-recommends \ g++-arm-linux-gnueabi \ gcc-arm-linux-gnueabi RUN apt-get autoremove -y && apt-get clean -RUN pip install --upgrade pip -RUN pip install wheel && pip install pre-commit RUN ln -s clang-format-5.0 /usr/bin/clang-format +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple wheel +RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pre-commit RUN cd /tmp && curl -O http://mirrors.neusoft.edu.cn/android/repository/android-ndk-r17b-linux-x86_64.zip +RUN curl -O https://mms-res.cdn.bcebos.com/cmake-3.10.3-Linux-x86_64.tar.gz && \ + tar xzf cmake-3.10.3-Linux-x86_64.tar.gz && \ + mv cmake-3.10.3-Linux-x86_64 /opt/cmake-3.10 && \ + mv /usr/bin/cmake /usr/bin/cmake.bak && ln -s /opt/cmake-3.10/bin/cmake /usr/bin/cmake RUN cd /opt && unzip /tmp/android-ndk-r17b-linux-x86_64.zip ENV NDK_ROOT /opt/android-ndk-r17b diff --git a/tools/toolchains/arm-linux-gnueabi.cmake b/tools/toolchains/arm-linux-gnueabi.cmake index ee3cb50796..c2b1b853de 100644 --- a/tools/toolchains/arm-linux-gnueabi.cmake +++ b/tools/toolchains/arm-linux-gnueabi.cmake @@ -13,4 +13,4 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -include("${CMAKE_CURRENT_LIST_DIR}/../arm-platform.cmake") +set(ARM_LINUX 1) -- GitLab