1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212# See the License for the specific language governing permissions and
1313# limitations under the License.
14- FROM ubuntu:20.04 as base_build
14+ FROM ubuntu:22.04@sha256:eb29ed27b0821dca09c2e28b39135e185fc1302036427d5f4d70a41ce8fd7659 as base_build
15+
1516
1617ARG TF_SERVING_VERSION_GIT_BRANCH=master
1718ARG TF_SERVING_VERSION_GIT_COMMIT=HEAD
@@ -27,37 +28,35 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2728 ca-certificates \
2829 curl \
2930 git \
30- gcc-10 \
31- g++-10 \
3231 libcurl3-dev \
3332 libfreetype6-dev \
3433 libpng-dev \
3534 libtool \
3635 libzmq3-dev \
3736 mlocate \
38- openjdk-8 -jdk\
39- openjdk-8 -jre-headless \
37+ openjdk-11 -jdk \
38+ openjdk-11 -jre-headless \
4039 pkg-config \
41- python -dev \
40+ python3 -dev \
4241 software-properties-common \
4342 swig \
4443 unzip \
4544 wget \
4645 zip \
4746 zlib1g-dev \
48- python3-distutils \
47+ python3-setuptools \
4948 && \
5049 apt-get clean && \
5150 rm -rf /var/lib/apt/lists/*
5251
53- # Install python 3.10.
54- RUN add-apt-repository ppa:deadsnakes/ppa && \
55- apt-get update && apt-get install -y \
52+ # Install python 3.10 (Native on Ubuntu 22.04).
53+ RUN apt-get update && apt-get install -y \
5654 python3.10 python3.10-dev python3-pip python3.10-venv && \
5755 rm -rf /var/lib/apt/lists/* && \
5856 python3.10 -m pip install pip --upgrade && \
5957 update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 0
6058
59+
6160# Make python3.10 the default python version
6261# If updating default python version, also update version in the WORKSPACE file.
6362RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 0
@@ -107,7 +106,6 @@ RUN bazel build --color=yes --curses=yes \
107106 --verbose_failures \
108107 --output_filter=DONT_MATCH_ANYTHING \
109108 ${TF_SERVING_BUILD_OPTIONS} \
110- --config=kokoro \
111109 tensorflow_serving/model_servers:tensorflow_model_server && \
112110 cp bazel-bin/tensorflow_serving/model_servers/tensorflow_model_server \
113111 /usr/local/bin/
@@ -118,7 +116,6 @@ RUN bazel build --color=yes --curses=yes \
118116 --verbose_failures \
119117 --output_filter=DONT_MATCH_ANYTHING \
120118 ${TF_SERVING_BUILD_OPTIONS} \
121- --config=kokoro \
122119 tensorflow_serving/tools/pip_package:build_pip_package && \
123120 bazel-bin/tensorflow_serving/tools/pip_package/build_pip_package \
124121 /tmp/pip && \
0 commit comments