Skip to content

Switch to slim Python Docker base image for TensorFlow docker builds and tidy up Python Dockerfile#437

Open
puneetmatharu wants to merge 2 commits intoARM-software:mainfrom
puneetmatharu:update-docker-builds
Open

Switch to slim Python Docker base image for TensorFlow docker builds and tidy up Python Dockerfile#437
puneetmatharu wants to merge 2 commits intoARM-software:mainfrom
puneetmatharu:update-docker-builds

Conversation

@puneetmatharu
Copy link
Contributor

Note that I currently have

RUN uv pip install -r requirements.txt --no-deps
...
# Install wheel
RUN set -eux && uv pip install "$(basename "$TENSORFLOW_WHEEL")" && rm "$(basename "$TENSORFLOW_WHEEL")"

to mimic what was done before. I'm not sure whether --no-deps should be used on both but the build breaks in that case. It's also the opposite approach to the PyTorch build (--no-deps on the wheel installs and no --no-deps on the requirements installs)... To be discussed...

@jondea
Copy link
Contributor

jondea commented Feb 10, 2026

The --no-deps on the built TS wheels was so that we could have e.g. torchvision~=2.5.0 with torch=~=2.5.0-dev-34er234r23q2342342342323rwrfwfweasgrhgeoiearfy123qb89r7612

@puneetmatharu
Copy link
Contributor Author

That makes sense. How do we construct our own requirements.txt to go with it? Build the image, install the wheels then do pip freeze? (Just so we know how to keep it up to date)

@jondea
Copy link
Contributor

jondea commented Feb 10, 2026

You could do that, but I think I did it the other way around. I ran each example and installed the minimum required deps to make them work, and pinned just those to minor versions. We only care about the minor versions of things that are script facing, everything below was allowed to change for patch/security reasons. But happy to be persuaded otherwise.

@puneetmatharu
Copy link
Contributor Author

That's the ideal approach (albeit more costly in time). For now I won't worry about this as it sounds like the current Dockerfile approach isn't invalid and moves us to the simpler Debian build. We can work towards simplifying the requirements.txt as much as possible when/if we do TF binary releases.

@puneetmatharu puneetmatharu changed the title Update docker builds Switch to slim Python Docker base image for TensorFlow docker builds Feb 11, 2026
@puneetmatharu puneetmatharu changed the title Switch to slim Python Docker base image for TensorFlow docker builds Switch to slim Python Docker base image for TensorFlow docker builds and tidy up Python Dockerfile Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants