aboutsummaryrefslogtreecommitdiff
path: root/docker/CI.Dockerfile
blob: d5ebfce5d97a33571fca5af336530f1c4b70ffe4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates.
# SPDX-License-Identifier: Apache-2.0
FROM ubuntu:22.04

ARG PYTHON_VERSION=3.9
ARG BAZEL_VERSION=5.1.1
ARG TENSORFLOW_VERSION=2.9.0

RUN apt-get update
RUN apt-get install -y build-essential software-properties-common clang curl unzip git libc++-dev libc++abi-dev

RUN add-apt-repository -y ppa:deadsnakes/ppa
RUN apt-get update

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/London

RUN apt-get install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-venv python${PYTHON_VERSION}-dev
RUN python${PYTHON_VERSION} -m ensurepip

RUN python${PYTHON_VERSION} -m pip install --no-cache-dir setuptools pybind11 numpy twine keyrings.alt wheel bandit==1.7.4

COPY install/install_bazel.sh /install/
RUN /install/install_bazel.sh ${BAZEL_VERSION}

ENV PYTHON_BIN_PATH=/usr/bin/python${PYTHON_VERSION}
ENV CI_BUILD_PYTHON=/usr/bin/python${PYTHON_VERSION}
ENV CROSSTOOL_PYTHON_INCLUDE_PATH=/usr/bin/python${PYTHON_VERSION}

ARG CACHE_STOP=1
RUN git clone --depth=1 https://github.com/tensorflow/tensorflow.git --branch v${TENSORFLOW_VERSION} /tensorflow_src