Dockerfile 2.11 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
# Copyright 2018, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
14
FROM ubuntu:18.04
15

michaelreneer's avatar
michaelreneer committed
16
# Install the python development environment
17
ARG USE_PYTHON_3=True
18
19
20
ARG _PY_SUFFIX=${USE_PYTHON_3:+3}
ARG PYTHON=python${_PY_SUFFIX}
ARG PIP=pip${_PY_SUFFIX}
21
22
23
24

# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8

25
26
RUN apt-get update && apt-get install -y \
    ${PYTHON}-dev \
Krzysztof Ostrowski's avatar
Krzysztof Ostrowski committed
27
28
    ${PYTHON}-pip \
    git
29

30
RUN ${PIP} install --no-cache-dir --upgrade \
31
32
33
    pip \
    setuptools

34
RUN ln -s -f $(which ${PYTHON}) /usr/local/bin/python
35
RUN ${PYTHON} --version
36

37
RUN apt update && apt install -y \
38
    build-essential \
39
    curl \
40
41
42
43
44
45
46
47
48
49
    openjdk-8-jdk \
    pkg-config \
    swig \
    unzip \
    wget \
    g++ \
    zlib1g-dev \
    zip

# Install bazel
50
ARG BAZEL_VERSION=0.26.1
51
52
53
54
55
56
RUN mkdir /bazel && \
    wget -O /bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
    wget -O /bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \
    chmod +x /bazel/installer.sh && \
    /bazel/installer.sh && \
    rm -f /bazel/installer.sh
57
RUN bazel version
58

59
# Install the TensorFlow Federated development environment dependencies
Michael Reneer's avatar
Michael Reneer committed
60
RUN ${PIP} install --no-cache-dir --upgrade \
61
    absl-py~=0.11.0 \
62
    attrs~=19.3.0 \
63
    cachetools~=3.1.1 \
64
    dm-tree~=0.1.1 \
65
    grpcio~=1.32.0 \
66
    h5py~=2.10.0 \
67
    numpy~=1.18.4 \
68
    portpicker~=1.3.1 \
69
    retrying~=1.3.3 \
70
    semantic-version~=2.8.5 \
71
    tensorflow-model-optimization~=0.5.0 \
72
    tensorflow-privacy~=0.5.0 \
73
74
    tf-nightly \
    tfa-nightly
75
RUN pip freeze