2019-06-23 03:20:14 +02:00
|
|
|
FROM ubuntu:18.04
|
|
|
|
|
2021-12-12 20:14:07 +01:00
|
|
|
LABEL maintainer="Michael Mayer <hello@photoprism.app>"
|
2019-06-23 03:20:14 +02:00
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2019-06-25 23:08:53 +02:00
|
|
|
ENV TMP /tmp
|
|
|
|
ENV EXTRA_BAZEL_ARGS "--host_javabase=@local_jdk//:jdk"
|
2019-06-23 03:20:14 +02:00
|
|
|
|
2021-02-15 12:08:04 +01:00
|
|
|
# Configure apt
|
2021-01-17 11:56:28 +01:00
|
|
|
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf.d/80retry && \
|
|
|
|
echo 'APT::Install-Recommends "false";' > /etc/apt/apt.conf.d/80recommends && \
|
|
|
|
echo 'APT::Install-Suggests "false";' > /etc/apt/apt.conf.d/80suggests && \
|
|
|
|
echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/80forceyes && \
|
|
|
|
echo 'APT::Get::Fix-Missing "true";' > /etc/apt/apt.conf.d/80fixmissin
|
2019-06-23 03:20:14 +02:00
|
|
|
|
|
|
|
# Install dev / build dependencies
|
|
|
|
RUN apt-get update && apt-get upgrade && \
|
|
|
|
apt-get install \
|
|
|
|
ca-certificates \
|
|
|
|
build-essential \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
libtool \
|
|
|
|
g++-4.8 \
|
|
|
|
gcc-4.8 \
|
|
|
|
libc6-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libssl-dev \
|
|
|
|
curl \
|
|
|
|
chrpath \
|
|
|
|
pkg-config \
|
|
|
|
unzip \
|
|
|
|
zip \
|
|
|
|
make \
|
|
|
|
nano \
|
|
|
|
wget \
|
2019-06-25 23:08:53 +02:00
|
|
|
git \
|
|
|
|
libtool \
|
|
|
|
python3 \
|
|
|
|
python3-git \
|
|
|
|
openjdk-8-jdk
|
2019-06-23 03:20:14 +02:00
|
|
|
|
2019-06-25 23:08:53 +02:00
|
|
|
# Use GCC 4.8 and Python 3 as default
|
2019-06-23 03:20:14 +02:00
|
|
|
# See https://www.tensorflow.org/install/source#tested_build_configurations
|
|
|
|
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10 && \
|
2019-06-25 23:08:53 +02:00
|
|
|
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10 && \
|
|
|
|
update-alternatives --install /usr/bin/python python /usr/bin/python3.6 10
|
2018-11-08 10:56:11 +01:00
|
|
|
|
2019-06-25 23:08:53 +02:00
|
|
|
# Download Bazel & TensorFlow
|
2019-06-23 03:20:14 +02:00
|
|
|
WORKDIR "/home/tensorflow"
|
2020-04-27 20:22:55 +02:00
|
|
|
RUN wget https://github.com/tensorflow/tensorflow/archive/v1.15.2.tar.gz
|
|
|
|
RUN tar -xzf v1.15.2.tar.gz
|
2019-06-23 03:20:14 +02:00
|
|
|
|
2019-06-27 03:22:09 +02:00
|
|
|
# Install Bazel
|
|
|
|
RUN wget https://github.com/bazelbuild/bazel/releases/download/0.24.1/bazel-0.24.1-linux-x86_64
|
|
|
|
RUN mv bazel-0.24.1-linux-x86_64 /usr/local/bin/bazel && chmod 755 /usr/local/bin/bazel
|
2018-11-08 10:56:11 +01:00
|
|
|
|
2019-06-25 23:08:53 +02:00
|
|
|
# Configure TensorFlow
|
2020-04-27 20:22:55 +02:00
|
|
|
WORKDIR "/home/tensorflow/tensorflow-1.15.2"
|
2020-01-15 19:54:33 +01:00
|
|
|
COPY ./*.sh ./
|
|
|
|
COPY ./*.diff ./
|
|
|
|
COPY ./.tf_configure.bazelrc .tf_configure.bazelrc
|
|
|
|
COPY ./Makefile Makefile
|