Dockerfile updates

pull/531/head
Lee Pepper 2017-04-03 13:22:15 -06:00
rodzic 2f6c24072c
commit bd23610cec
1 zmienionych plików z 71 dodań i 77 usunięć

Wyświetl plik

@ -1,77 +1,71 @@
#Pull in previously built packages image with lots of libraries. #Pull in previously built packages image with lots of libraries.
FROM phusion/baseimage FROM phusion/baseimage
# Env variables # Env variables
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
#Install dependencies #Install dependencies
#Required Requisites #Required Requisites
RUN add-apt-repository -y ppa:ubuntugis/ppa RUN add-apt-repository -y ppa:ubuntugis/ppa
RUN add-apt-repository -y ppa:george-edison55/cmake-3.x RUN add-apt-repository -y ppa:george-edison55/cmake-3.x
RUN apt-get update -y RUN apt-get update -y
# All packages (Will install much faster) # All packages (Will install much faster)
RUN apt-get install -y git cmake python-pip build-essential software-properties-common python-software-properties libgdal-dev gdal-bin libgeotiff-dev \ RUN apt-get install --no-install-recommends -y git cmake python-pip build-essential software-properties-common python-software-properties libgdal-dev gdal-bin libgeotiff-dev \
libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libflann-dev \ libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libflann-dev \
libproj-dev libxext-dev liblapack-dev libeigen3-dev libvtk5-dev python-networkx libgoogle-glog-dev libsuitesparse-dev libboost-filesystem-dev libboost-iostreams-dev \ libproj-dev libxext-dev liblapack-dev libeigen3-dev libvtk5-dev python-networkx libgoogle-glog-dev libsuitesparse-dev libboost-filesystem-dev libboost-iostreams-dev \
libboost-regex-dev libboost-python-dev libboost-date-time-dev libboost-thread-dev python-pyproj python-empy python-nose python-pyside python-pyexiv2 python-scipy \ libboost-regex-dev libboost-python-dev libboost-date-time-dev libboost-thread-dev python-pyproj python-empy python-nose python-pyside python-pyexiv2 python-scipy \
jhead liblas-bin python-matplotlib libatlas-base-dev jhead liblas-bin python-matplotlib libatlas-base-dev
RUN apt-get remove libdc1394-22-dev RUN apt-get remove libdc1394-22-dev
RUN pip install --upgrade pip
RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings RUN pip install setuptools
RUN pip install -U PyYAML exifread gpxpy xmltodict catkin-pkg appsettings
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" # Prepare directories
RUN mkdir /code
# Prepare directories WORKDIR /code
#RUN rm -rf /code
RUN mkdir /code # Copy repository files
WORKDIR /code COPY ccd_defs_check.py /code/ccd_defs_check.py
COPY CMakeLists.txt /code/CMakeLists.txt
COPY configure.sh /code/configure.sh
COPY /modules/ /code/modules/
# Copy repository files COPY /opendm/ /code/opendm/
COPY ccd_defs_check.py /code/ccd_defs_check.py COPY /patched_files/ /code/patched_files/
COPY CMakeLists.txt /code/CMakeLists.txt COPY run.py /code/run.py
COPY configure.sh /code/configure.sh COPY /scripts/ /code/scripts/
#COPY /.git/ /code/.git/ COPY /SuperBuild/cmake/ /code/SuperBuild/cmake/
#COPY .gitignore /code/.gitignore COPY /SuperBuild/CMakeLists.txt /code/SuperBuild/CMakeLists.txt
#COPY .gitmodules /code/.gitmodules COPY docker.settings.yaml /code/settings.yaml
COPY /modules/ /code/modules/ COPY VERSION /code/VERSION
COPY /opendm/ /code/opendm/
COPY /patched_files/ /code/patched_files/ #Compile code in SuperBuild and root directories
COPY run.py /code/run.py
COPY /scripts/ /code/scripts/ RUN cd SuperBuild && mkdir build && cd build && cmake .. && make -j$(nproc) && cd ../.. && mkdir build && cd build && cmake .. && make -j$(nproc)
COPY /SuperBuild/cmake/ /code/SuperBuild/cmake/
COPY /SuperBuild/CMakeLists.txt /code/SuperBuild/CMakeLists.txt
COPY docker.settings.yaml /code/settings.yaml RUN apt-get -y remove libgl1-mesa-dri git cmake python-pip build-essential
COPY /tests/ /code/tests/ RUN apt-get install -y libvtk5-dev
COPY VERSION /code/VERSION
# Cleanup APT
# Update submodules RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# RUN git submodule init && git submodule update
# Clean Superbuild
#Compile code in SuperBuild and root directories
# Replace g++ and gcc with our own scripts RUN rm -rf /code/SuperBuild/download
# COPY /docker/ /code/docker/ RUN rm -rf /code/SuperBuild/src/opencv/samples /code/SuperBuild/src/pcl/test /code/SuperBuild/src/pcl/doc /code/SuperBuild/src/pdal/test /code/SuperBuild/src/pdal/doc
# RUN mv -v /usr/bin/gcc /usr/bin/gcc_real && mv -v /usr/bin/g++ /usr/bin/g++_real && cp -v /code/docker/gcc /usr/bin/gcc && cp -v /code/docker/g++ /usr/bin/g++
#Compile code in SuperBuild and root directories # Entry point
ENTRYPOINT ["python", "/code/run.py", "code"]
RUN cd SuperBuild && mkdir build && cd build && cmake -w .. && make -w -j$(nproc) && cd ../.. && mkdir build && cd build && cmake -w .. && make -w -j$(nproc)
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Entry point
ENTRYPOINT ["python", "/code/run.py", "code"]