I am trying to build a lightweight docker image with tfx library installed, as the officially released image is pretty heavy in size (~9 GBs).
Here is the code that I am using for the image now:
FROM python:3.8-slim AS base
RUN pip install --upgrade pip
RUN apt-get update && apt-get install -y gcc g++ && rm -rf /var/lib/apt/lists/*
RUN pip install tfx==1.12.0 --no-cache-dir
The image that is built now is around 2.7 GBs in size. However, I feel like most of these packages are for GPUs and not CPUs as tfx is dependent on the main tensorflow package. Is there a way that I use tensorflow-cpu as its dependency rather than the full package to make the image smaller?
Thanks.