• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FROM ubuntu:${UBUNTU_VERSION} AS base
2
3ENV DEBIAN_FRONTEND=noninteractive
4RUN apt-get update && apt-get install -y --no-install-recommends \
5        build-essential \
6        clang-format \
7        curl \
8        git \
9        libcurl3-dev \
10        libfreetype6-dev \
11        libhdf5-serial-dev \
12        libzmq3-dev \
13        pkg-config \
14        rsync \
15        software-properties-common \
16        sudo \
17        unzip \
18        zip \
19        zlib1g-dev \
20        openjdk-8-jdk \
21        openjdk-8-jre-headless \
22        && \
23    apt-get clean && \
24    rm -rf /var/lib/apt/lists/*
25
26ENV CI_BUILD_PYTHON python
27
28# CACHE_STOP is used to rerun future commands, otherwise cloning tensorflow will be cached and will not pull the most recent version
29ARG CACHE_STOP=1
30# Check out TensorFlow source code if --build-arg CHECKOUT_TF_SRC=1
31ARG CHECKOUT_TF_SRC=0
32# In case of Python 2.7+ we need to add passwd entries for user and group id
33RUN chmod a+w /etc/passwd /etc/group
34RUN test "${CHECKOUT_TF_SRC}" -eq 1 && git clone --depth=1 https://github.com/tensorflow/tensorflow.git /tensorflow_src || true
35