tensorflow/tfx

Getting error with building Docker image from 'tfx/tools/docker/build_docker_image.sh'

AbdirayimovS opened this issue · 5 comments

Dear friends,
I want to build a docker image with tfx.
I copied the build_docker_image.sh file and Dockerfile into my local machine.
Environment in which the code is executed: MacOS

Describe the current behavior
I have changes direction of Dockerfile in the build_docker_image.sh file:
docker build --target wheel-builder\ -t ${wheel_builder_tag} \ -f _tfx/tools/docker/${DOCKER_FILE}_ \ -> **${DOCKER_FILE}** --build-arg TFX_DEPENDENCY_SELECTOR=${TFX_DEPENDENCY_SELECTOR} \ . "$@"

Output

`Dockerfile:63

61 |
62 | # Build stage to extend DLVM image.
63 | >>> FROM ${BASE_IMAGE} as install
64 |
65 | # Additional Python packages which will be installed.

ERROR: failed to solve: base name (${BASE_IMAGE}) should not be blank`

Looking forward to hearing from you!

Sincerely,
Sardor

@AbdirayimovS,

It looks like the build_docker_image.sh script is broken. I tried to patch the Dockerfile by explicitly providing the BASE_IMAGE and BEAM_VERSION as shown below.

# Base image for the final image. Required.
ARG BASE_IMAGE="gcr.io/deeplearning-platform-release/tf2-gpu.2-12.py310:latest"
# Apache beam version to get Beam binaries.
ARG BEAM_VERSION="2.40.0"

This patch resolves this error but the build fails with conflicting dependencies of pyarrow package. Let us work on this issue and we will update this thread once we resolve it. Thank you for bringing this up to our attention.

@AbdirayimovS,

We need to pass certain flags while running the script to build TFX image. I am able to build the image successfully with this command. Please try the below steps and let us know if you face any issues. Thank you!

Clone the TFX repository and change the directory to tfx and run the script with flags as shown below.

git clone https://github.com/tensorflow/tfx.git
cd tfx
./tfx/tools/docker/build_docker_image.sh --build-arg TFX_DEPENDENCY_SELECTOR=NIGHTLY --build-arg BASE_IMAGE=gcr.io/deeplearning-platform-release/tf2-gpu.2-13.py310 --build-arg BEAM_VERSION=2.49.0 --build-arg ADDITIONAL_PACKAGES=tensorflow==2.13.0

Ref: screenshot
image
image

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

This issue was closed due to lack of activity after being marked stale for past 7 days.

Are you satisfied with the resolution of your issue?
Yes
No