File size: 949 Bytes
9b18c5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.6-slim

# System libs CNTK's native _cntk_py.so needs at import time
RUN apt-get update && apt-get install -y --no-install-recommends \
        libgomp1 libunwind8 wget build-essential ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# CNTK 2.7 was built against OpenMPI 1.10 (SONAME libmpi_cxx.so.1 / libmpi.so.12).
# Debian buster only packages OpenMPI 4.x (.so.40), an ABI mismatch, so build 1.10.7.
RUN cd /tmp \
    && wget -q https://download.open-mpi.org/release/open-mpi/v1.10/openmpi-1.10.7.tar.gz \
    && tar xf openmpi-1.10.7.tar.gz \
    && cd openmpi-1.10.7 \
    && ./configure --prefix=/usr/local >/dev/null \
    && make -j"$(nproc)" >/dev/null 2>&1 \
    && make install >/dev/null 2>&1 \
    && ldconfig \
    && cd / && rm -rf /tmp/openmpi-1.10.7*

RUN pip install --no-cache-dir cntk==2.7

# Verify the real library imports at build time
RUN python -c "import cntk; print('CNTK import OK', cntk.__version__)"