https://github.com/Microsoft/CNTK
Revision dbc5783f34630f2b9e8aba1935a358d3684da0f1 authored by Alexey Kamenev on 10 May 2016, 17:58:13 UTC, committed by Alexey Kamenev on 10 May 2016, 17:58:13 UTC
1 parent 7efa57e
Raw File
Tip revision: dbc5783f34630f2b9e8aba1935a358d3684da0f1 authored by Alexey Kamenev on 10 May 2016, 17:58:13 UTC
Updated testcase.
Tip revision: dbc5783
Dockerfile-CPU
# CNTK Dockerfile
#   CPU only
#   No 1-bit SGD
#   Assumes AMD ACML has been previously downloaded and the .tgz file resides in Docker dir

FROM ubuntu:14.04

RUN apt-get update && apt-get install -y --no-install-recommends \
        autotools-dev \
        build-essential \
        cmake \
        git \
        g++-multilib \
        gcc-multilib \
        libavcodec-dev \
        libavformat-dev \
        libjasper-dev \
        libjpeg-dev \
        libpng-dev \
        liblapacke-dev \
        libswscale-dev \
        libtiff-dev \
        pkg-config \
        python-dev \
        python-numpy \
        python-pip \
        wget \
        zlib1g-dev && \
    rm -rf /var/lib/apt/lists/*

RUN wget -q -O - https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.1.tar.gz | tar -xzf - && \
    cd openmpi-1.10.1 && \
    ./configure --prefix=/usr/local/mpi && \
    make -j"$(nproc)" install && \
    rm -rf /openmpi-1.10.1

ENV PATH /usr/local/mpi/bin:$PATH
ENV LD_LIBRARY_PATH /usr/local/mpi/lib:$LD_LIBRARY_PATH

RUN wget -q -O - http://nih.at/libzip/libzip-1.1.2.tar.gz | tar -xzf - && \
    cd libzip-1.1.2 && \
    ./configure && \
    make -j"$(nproc)" install && \
    rm -rf /libzip-1.1.2

RUN wget -q -O - https://github.com/Itseez/opencv/archive/3.0.0.tar.gz | tar -xzf - && \
    cd opencv-3.0.0 && \
    cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/usr/local/opencv-3.0.0 . && \
    make -j"$(nproc)" install && \
    rm -rf /opencv-3.0.0

RUN wget -q -O - https://github.com/xianyi/OpenBLAS/archive/v0.2.17.tar.gz | tar -xzf - && \
    cd OpenBLAS-0.2.17 && \
    make -j"$(nproc)" && \
    make PREFIX=/usr/local/openblas install && \
    rm -rf /OpenBLAS-0.2.17

WORKDIR /cntk

RUN git clone --depth=1 -b master https://github.com/Microsoft/CNTK.git . && \
    sed -i 's/-lopenblas/-lopenblas -llapacke/g' Makefile && \
    mkdir -p build/release && \
    cd build/release && \
    ../../configure --with-openblas=/usr/local/openblas && \
     make -j1 all 

ENV PATH=/cntk/build/release/bin:$PATH
back to top