Commit f0f552d4 authored by Chuck Atkins's avatar Chuck Atkins

Use more system libraries and add OSMesa builds

parent 0083baa8
......@@ -2,127 +2,90 @@ FROM debian:7
MAINTAINER Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
RUN apt-get update && \
apt-get install -y \
wget \
build-essential \
pkg-config \
libx11-dev \
libxext-dev \
libxdamage-dev \
x11proto-gl-dev \
libx11-dev libxext-dev libxdamage-dev x11proto-gl-dev \
libx11-xcb-dev \
libdrm-dev \
libudev-dev \
bison flex \
gcc-4.7 \
python \
python-mako \
git \
wget \
scons
# x11proto-gl-dev version is 1.4.11 instead of 1.4.13. Let's see.
#----------------------------------------------------------------------------------------------
WORKDIR /opt/tools/src
RUN wget http://mirrors.concertpass.com/gcc/releases/gcc-4.8.5/gcc-4.8.5.tar.gz
RUN tar zxf gcc-4.8.5.tar.gz
# Lets build gcc
WORKDIR /opt/tools/src/gcc-4.8.5
RUN ./contrib/download_prerequisites
WORKDIR /opt/tools/src/gcc-4.8.5-objdir
RUN /opt/tools/src/gcc-4.8.5-objdir/../gcc-4.8.5/configure --prefix=/opt/tools --enable-languages=c,c++ --with-multilib-list=m64
RUN make -j 24 && make install
ENV PATH /opt/tools/bin:$PATH
ENV CC /opt/tools/bin/gcc
ENV CXX /opt/tools/bin/g++
ENV LD_LIBRARY_PATH /opt/tools/lib64:/opt/tools/lib
#----------------------------------------------------------------------------------------------
WORKDIR /opt/tools/src
RUN wget --no-check-certificate https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
RUN tar Jxf Python-2.7.10.tar.xz
ENV CC gcc-4.7
ENV CXX g++-4.7
#WORKDIR /opt/tools/src/Python-2.7.10
#RUN ./configure --prefix=/opt/tools --enable-unicode --enable-shared
#RUN make -j 24 && make install
RUN apt-get install -y python
#-------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------------
WORKDIR /opt/tools/src
RUN wget --no-check-certificate https://cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz
WORKDIR /opt/tools
RUN tar zxf src/cmake-3.3.2-Linux-x86_64.tar.gz
#ENV PATH /opt/tools/cmake-3.3.2-Linux-x86_64:$PATH
RUN wget https://cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.tar.gz
RUN tar xf cmake-3.4.1-Linux-x86_64.tar.gz
#----------------------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
WORKDIR /opt/tools/src
RUN wget http://llvm.org/releases/3.6.2/llvm-3.6.2.src.tar.xz
RUN tar Jxf llvm-3.6.2.src.tar.xz
WORKDIR /opt/tools/llvm-3.6.2.build
RUN /opt/tools/cmake-3.3.2-Linux-x86_64/bin/cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/opt/tools\
-DCMAKE_BUILD_TYPE:STRING=Release \
-DLLVM_ENABLE_RTTI:BOOL=ON /opt/tools/src/llvm-3.6.2.src/
RUN make -j 25 && make install
#----------------------------------------------------------------------------------------------
RUN apt-get install -y python-mako flex bison libnuma-dev
RUN wget http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz
RUN tar xf llvm-3.7.0.src.tar.xz
WORKDIR /opt/tools/llvm-3.7.0.build
RUN /opt/tools/src/cmake-3.4.1-Linux-x86_64/bin/cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DLLVM_ENABLE_RTTI:BOOL=ON \
-DLLVM_TARGETS_TO_BUILD:STRING=X86 \
/opt/tools/src/llvm-3.7.0.src/
RUN make -j 8
ENV PATH /opt/tools/llvm-3.7.0.build/bin:$PATH
#-------------------------------------------------------------------------------
WORKDIR /opt/tools/src
RUN wget ftp://ftp.freedesktop.org/pub/mesa/11.0.4/mesa-11.0.4.tar.xz
RUN tar Jxf mesa-11.0.4.tar.xz
run wget ftp://ftp.freedesktop.org/pub/mesa/11.1.0/mesa-11.1.0.tar.xz
RUN tar xf mesa-11.1.0.tar.xz
WORKDIR /opt/tools/src/mesa-11.0.4
RUN scons build=release texture_float=yes libgl-xlib
WORKDIR /opt/tools/src/mesa-11.1.0
RUN scons build=release texture_float=yes libgl-xlib osmesa
WORKDIR /opt/tools/mesa-llvm
RUN cp /opt/tools/src/mesa-11.0.4/build/linux-x86_64/gallium/targets/libgl-xlib/libGL.so.1.5 . && \
WORKDIR /opt/tools/inst/mesa-llvm
RUN cp /opt/tools/src/mesa-11.1.0/build/linux-x86_64/gallium/targets/libgl-xlib/libGL.so.1.5 . && \
ln -s libGL.so.1 libGL.so && \
ln -s libGL.so.1.5 libGL.so.1
#----------------------------------------------------------------------------------------------
WORKDIR /opt/tools/src/openswr-mesa
RUN git clone https://github.com/OpenSWR/openswr-mesa.git src-avx2 --depth 1 -b 11.0-openswr
WORKDIR /opt/tools/src/openswr-mesa/src-avx2
RUN scons build=release texture_float=yes swr_arch=core-avx2 libgl-xlib
WORKDIR /opt/tools/mesa-swr-avx2
RUN cp /opt/tools/src/openswr-mesa/src-avx2/build/linux-x86_64/gallium/targets/libgl-xlib/libGL.so.1.5 . && \
ln -s libGL.so.1 libGL.so && \
ln -s libGL.so.1.5 libGL.so.1
#----------------------------------------------------------------------------------------------
WORKDIR /opt/tools/src/openswr-mesa
RUN git clone https://github.com/OpenSWR/openswr-mesa.git src-avx --depth 1 -b 11.0-openswr
WORKDIR /opt/tools/src/openswr-mesa/src-avx
RUN scons build=release texture_float=yes swr_arch=avx libgl-xlib
WORKDIR /opt/tools/mesa-swr-avx
RUN cp /opt/tools/src/openswr-mesa/src-avx/build/linux-x86_64/gallium/targets/libgl-xlib/libGL.so.1.5 . && \
ln -s libGL.so.1 libGL.so && \
ln -s libGL.so.1.5 libGL.so.1
#----------------------------------------------------------------------------------------------
WORKDIR /opt/tools/src/os-mesa
RUN wget ftp://ftp.freedesktop.org/pub/mesa/11.0.4/mesa-11.0.4.tar.xz
RUN tar Jxf mesa-11.0.4.tar.xz
WORKDIR /opt/tools/src/os-mesa/mesa-11.0.4
RUN ./configure \
--disable-xvmc \
--disable-glx \
--disable-dri \
--with-dri-drivers= \
--with-gallium-drivers=swrast \
--enable-texture-float \
--disable-egl \
--with-egl-platforms= \
--enable-gallium-osmesa \
--enable-gallium-llvm=yes \
--disable-llvm-shared-libs \
--with-llvm-prefix=/opt/tools \
--prefix=/opt/tools/osmesa
RUN make -j 25
RUN make install
#----------------------------------------------------------------------------------------------
WORKDIR /opt/tools
RUN cp /opt/tools/src/mesa-11.1.0/build/linux-x86_64/gallium/targets/osmesa/libosmesa.so ./libOSMesa.so.8.0.0 && \
ln -s libOSMesa.so.8.0.0 libOSMesa.so.8 && \
ln -s libOSMesa.so.8 libOSMesa.so
#-------------------------------------------------------------------------------
WORKDIR /opt/tools/src/
RUN git clone https://github.com/OpenSWR/openswr-mesa.git mesa-swr-avx -b 11.0-openswr
WORKDIR /opt/tools/src/mesa-swr-avx
RUN scons build=release texture_float=yes swr_arch=avx libgl-xlib osmesa
WORKDIR /opt/tools/inst/mesa-swr-avx
RUN cp /opt/tools/src/mesa-swr-avx/build/linux-x86_64/gallium/targets/libgl-xlib/libGL.so.1.5 . && \
ln -s libGL.so.1.5 libGL.so.1 && \
ln -s libGL.so.1 libGL.so
RUN cp /opt/tools/src/mesa-swr-avx/build/linux-x86_64/gallium/targets/osmesa/libosmesa.so ./libOSMesa.so.8.0.0 && \
ln -s libOSMesa.so.8.0.0 libOSMesa.so.8 && \
ln -s libOSMesa.so.8 libOSMesa.so
#-------------------------------------------------------------------------------
WORKDIR /opt/tools/src/
RUN git clone https://github.com/OpenSWR/openswr-mesa.git mesa-swr-avx2 -b 11.0-openswr
WORKDIR /opt/tools/src/mesa-swr-avx2
RUN scons build=release texture_float=yes swr_arch=core-avx2 libgl-xlib osmesa
WORKDIR /opt/tools/inst/mesa-swr-avx2
RUN cp /opt/tools/src/mesa-swr-avx2/build/linux-x86_64/gallium/targets/libgl-xlib/libGL.so.1.5 . && \
ln -s libGL.so.1.5 libGL.so.1 && \
ln -s libGL.so.1 libGL.so
RUN cp /opt/tools/src/mesa-swr-avx2/build/linux-x86_64/gallium/targets/osmesa/libosmesa.so ./libOSMesa.so.8.0.0 && \
ln -s libOSMesa.so.8.0.0 libOSMesa.so.8 && \
ln -s libOSMesa.so.8 libOSMesa.so
#-------------------------------------------------------------------------------
WORKDIR /opt/tools/inst
RUN tar zcvf mesa-llvm.tar.gz mesa-llvm
RUN tar zcvf mesa-swr-avx2.tar.gz mesa-swr-avx2
RUN tar zcvf mesa-swr-avx.tar.gz mesa-swr-avx
RUN tar zcvf osmesa.tar.gz osmesa
RUN tar zcvf mesa-swr-avx2.tar.gz mesa-swr-avx2
CMD bash
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment