Freshly downloaded custom vision docker file fails to build.

Harold Pulcher 1 Reputation point MVP
2022-07-13T03:30:37.693+00:00

I have a trained custom vision model. When export the model to a Dockerfile, that file will fail the build.

I am building this on a Raspberry Pi 4GB running:
Ubuntu 20.04
Ubuntu 22.04

I downloaded both t he "Linux" and "ARM" version of the Dockerfile. Pretty much the same result.

Here is a sample:

ubuntu@demo-rpi:~$ cd custom_vision_linux/  
ubuntu@demo-rpi:~/custom_vision_linux$ ls  
Dockerfile  LICENSE  README.md  README.txt  app  azureml  
ubuntu@demo-rpi:~/custom_vision_linux$ docker build .  
Sending build context to Docker daemon  11.23MB  
Step 1/8 : FROM python:3.7-slim  
 ---> 07ab5dfe81e0  
Step 2/8 : RUN pip install -U pip  
 ---> Running in dbe0425cc9ef  
Requirement already satisfied: pip in /usr/local/lib/python3.7/site-packages (22.0.4)  
Collecting pip  
  Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)  
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 4.1 MB/s eta 0:00:00  
Installing collected packages: pip  
  Attempting uninstall: pip  
    Found existing installation: pip 22.0.4  
    Uninstalling pip-22.0.4:  
      Successfully uninstalled pip-22.0.4  
Successfully installed pip-22.1.2  

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv  
Removing intermediate container dbe0425cc9ef  
 ---> a508ba7d0190  
Step 3/8 : RUN pip install --no-cache-dir numpy~=1.17.5 tensorflow~=2.0.2 flask~=2.1.2 pillow~=7.2.0  
 ---> Running in 59edcb9abe7a  
Collecting numpy~=1.17.5  
  Downloading numpy-1.17.5.zip (6.4 MB)  
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 3.9 MB/s eta 0:00:00  
  Preparing metadata (setup.py): started  
  Preparing metadata (setup.py): finished with status 'done'  
ERROR: Ignored the following versions that require a different python version: 1.22.0 Requires-Python >=3.8; 1.22.0rc1 Requires-Python >=3.8; 1.22.0rc2 Requires-Python >=3.8; 1.22.0rc3 Requires-Python >=3.8; 1.22.1 Requires-Python >=3.8; 1.22.2 Requires-Python >=3.8; 1.22.3 Requires-Python >=3.8; 1.22.4 Requires-Python >=3.8; 1.23.0 Requires-Python >=3.8; 1.23.0rc1 Requires-Python >=3.8; 1.23.0rc2 Requires-Python >=3.8; 1.23.0rc3 Requires-Python >=3.8; 1.23.1 Requires-Python >=3.8  
ERROR: Could not find a version that satisfies the requirement tensorflow~=2.0.2 (from versions: none)  
ERROR: No matching distribution found for tensorflow~=2.0.2  
The command '/bin/sh -c pip install --no-cache-dir numpy~=1.17.5 tensorflow~=2.0.2 flask~=2.1.2 pillow~=7.2.0' returned a non-zero code: 1  
Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
295 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Harold Pulcher 1 Reputation point MVP
    2022-07-22T00:04:31.283+00:00

    I thihk I am getting close to an answer.

    I tried the linux version on a fresh ubuntu 20.04. It worked as expected.

    I believe the issue is the raspberry pi 4 and ubuntu combo that does not have a package built for it. I don't know enough on how the package system works, so I am gonna do some research to find out.

    When is currently takes numerous steps to install tensorflow on a rpi4, I am thinking that a straight up package is no longer gonna happen.

    Happen to know where the repo is for the custom vision ai export, so I can start up an issue? I think I can find it, but a direct link would be a great help.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.