mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
Improve caching, linter compliance, and runtime image sizes. Notable image size reductions: - syscallbench: 160MB drop (~250 MB -> ~90 MB) by converting to a multi-stage build (AS build) to strip gcc and build tools from the runtime image. - absl: 80MB drop (665MB -> 486MB) by combining Bazel installer download, execution, and cleanup into a single RUN layer. - build-grpc : 450MB drop (1.38GB -> 830MB) by removing temporary bazel-*.sh installer scripts from intermediate layers and adding --no-install-recommends. - tensorflow: 60MB (1.29GB -> 1.23GB) drop by clearing /var/lib/apt/lists/* cache. - util: 56MB (137MB -> 81MB) by clearing apt cache lists. PiperOrigin-RevId: 958783211
25 lines
846 B
Docker
25 lines
846 B
Docker
FROM ubuntu:jammy
|
|
|
|
RUN set -x \
|
|
&& apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
wget \
|
|
git \
|
|
pkg-config \
|
|
zip \
|
|
g++ \
|
|
zlib1g-dev \
|
|
unzip \
|
|
python3 \
|
|
ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN wget -q https://github.com/bazelbuild/bazel/releases/download/7.3.2/bazel-7.3.2-installer-linux-x86_64.sh && \
|
|
chmod +x bazel-7.3.2-installer-linux-x86_64.sh && \
|
|
./bazel-7.3.2-installer-linux-x86_64.sh && \
|
|
rm -f bazel-7.3.2-installer-linux-x86_64.sh
|
|
|
|
RUN mkdir abseil-cpp && cd abseil-cpp \
|
|
&& git init && git remote add origin https://github.com/abseil/abseil-cpp.git \
|
|
&& git fetch --depth 1 origin 79e414672f447ac1b27f8cb27ad61df315a3792b && git checkout FETCH_HEAD
|