tensorflow: CI build gives a command not found error on /install/install_pip_packages.sh
Steps to error:
- I forked Tensorflow
masterbranch - WITH a Github workspace I created a new branch for editing.
- I tried to run CI tests from the
/workspaces/tensorflow/directory with command:
tensorflow/tools/ci_build/ci_build.sh CPU bazel test //tensorflow/...
- This led me to the following error:
Building container (tf_ci.cpu)… [+] Building 1.7s (11/17) docker:default => [internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => [internal] load build definition from Dockerfile.cpu 0.1s => => transferring dockerfile: 654B 0.0s => [internal] load metadata for docker.io/library/ubuntu:16.04 0.8s => [auth] library/ubuntu:pull token for registry-1.docker.io 0.0s => [ 1/12] FROM docker.io/library/ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d 0.0s => [internal] load build context 0.1s => => transferring context: 1.73kB 0.0s => CACHED [ 2/12] COPY install/*.sh /install/ 0.0s => CACHED [ 3/12] RUN /install/install_bootstrap_deb_packages.sh 0.0s => CACHED [ 4/12] RUN add-apt-repository -y ppa:openjdk-r/ppa && add-apt-repository -y ppa:george-edison55/cmake- 0.0s => CACHED [ 5/12] RUN /install/install_deb_packages.sh 0.0s => ERROR [ 6/12] RUN /install/install_pip_packages.sh 0.6s
[ 6/12] RUN /install/install_pip_packages.sh:
0.359 --2023-12-15 16:46:42-- https://bootstrap.pypa.io/get-pip.py 0.359 Resolving bootstrap.pypa.io (bootstrap.pypa.io)… 151.101.36.175, 2a04:4e42:9::175 0.383 Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|151.101.36.175|:443… connected. 0.393 HTTP request sent, awaiting response… 200 OK 0.399 Length: 2632263 (2.5M) [text/x-python] 0.399 Saving to: ‘get-pip.py’ 0.399 0.399 0K … … … … … 1% 35.2M 0s […] 0.430 2500K … … … … … 99% 120M 0s 0.430 2550K … … 100% 130M=0.03s 0.430 0.430 2023-12-15 16:46:42 (81.1 MB/s) - ‘get-pip.py’ saved [2632263/2632263] 0.430 0.432 /install/install_pip_packages.sh: line 21: python3.6: command not found
Dockerfile.cpu:11
9 | add-apt-repository -y ppa:george-edison55/cmake-3.x 10 | RUN /install/install_deb_packages.sh 11 | >>> RUN /install/install_pip_packages.sh 12 | RUN /install/install_bazel.sh 13 | RUN /install/install_proto3.sh
ERROR: failed to solve: process “/bin/sh -c /install/install_pip_packages.sh” did not complete successfully: exit code: 127 ERROR: docker build failed. Dockerfile is at /workspaces/tensorflow/tensorflow/tools/ci_build/Dockerfile.cpu
</details>
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (9 by maintainers)
Commits related to this issue
- Solved tensorflow ci build issue #62645 - Build and install parallel python from source inside dockerfile. - Update and install required pip packages. — committed to giuliocn/tensorflow by giuliocn 3 years ago
- Solved #62645 ci build failure. — committed to giuliocn/tensorflow by giuliocn 3 years ago
- Solved #62645 ci build failure. — committed to giuliocn/tensorflow by giuliocn 3 years ago
With Tensorflow v2.16.1 (latest) the issue is still present. @tilakrayal Let me know how I can assist you. Please note that my PR solves this issue but BAZEL raises a new error downstream. This led me to change the PR to a draft pull request.
Hi @giuliocn ,
For nightly you need to have Python version in the range of 3.9-3.11. You need to install Python in this range.
For me it seems even though you are updating the python the python path not set to updated version. Could you try to set the path to newly installed python version. For example for me this instructions worked for updating python version in Google colab.
The error message indicates that the Docker build process is failing at the step where it is trying to run the
/install/install_pip_packages.shscript inside the container. The specific error is:This suggests that the Python 3.6 executable is not available in the Docker image at the time this script is being executed.
To resolve this issue, you can try the following steps:
Check Python Version: Confirm the available Python version in your Docker image. It seems that Python 3.6 is not installed or is not in the system’s PATH.
Update Install Script: Update the
/install/install_pip_packages.shscript to use the correct Python version available in your Docker image. You might need to replacepython3.6with the appropriate Python executable name.For example, if the available Python executable is
python3, you can update the script as follows:Modify Dockerfile: Ensure that the Dockerfile (
Dockerfile.cpu) specifies the correct version of Python. You may need to install Python 3.6 explicitly if it’s not included in the base image.Add the following lines to your Dockerfile before the problematic script:
Verify Dockerfile Context: Ensure that all the necessary files and dependencies are available in the Docker build context. It’s possible that some required files or scripts are missing.
Review Dependencies: Double-check other dependencies and scripts that may affect the Python installation. Sometimes, issues in earlier steps can cascade into problems in later steps.
After making these adjustments, try rebuilding the Docker image and see if the issue is resolved. If you encounter further issues, review the relevant parts of the Dockerfile and installation scripts to identify any missing dependencies or incorrect configurations. @SuryanarayanaY @giuliocn