Select to view content in your preferred language

Deploying function App to azure stuck on 'running pip install 2/4' when arcgis is in requirements.txt

908
5
06-01-2024 11:01 PM
j-bromp
Regular Contributor

Hey guys,

I am having issues deploying a function app to Azure. I have restarted the whole process a few times, specified versions in requirements.txt, deployed a dummy function just to see if i could deploy. Dummy function deployed successfully, but when i add arcgis to requirements.txt it takes agggess and then fails. i tried putting my real code into the function and deploying without arcgis in the requirements.txt file (this fails pretty quickly), when i add arcgis to requirements.txt, the same thing happens - it takes agges on 'running pip install 2/4' then fails. I tried changing the deploy timeout to 1 hour in case it was just a size issue but it failed at about 45 minutes.

I get the message in vscode: "Deployment 'latest' not found."

Been trying to figure this out for a couple of days now to no avail. Any help would be much appreciated!

0 Kudos
5 Replies
EarlMedina
Esri Regular Contributor

Is there anything in the logs with more information about the failure? Is the .zip failing to upload, for example?

0 Kudos
j-bromp
Regular Contributor

Hey @EarlMedina ,

This is in the output tab on vscode:

9:45:35 AM app-mapFilter: Zip package size: 8.18 kB
9:45:34 AM app-mapFilter: Fetching changes.
9:45:35 AM app-mapFilter: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/50ac60f2-0f7f-4715-846c-352384ae3e96.zip (0.01 MB) to /tmp/zipdeploy/extracted
9:45:37 AM app-mapFilter: Updating submodules.
9:45:38 AM app-mapFilter: Preparing deployment for commit id '0b64e5d8-9'.
9:45:38 AM app-mapFilter: PreDeployment: context.CleanOutputPath False
9:45:38 AM app-mapFilter: PreDeployment: context.OutputPath /home/site/wwwroot
9:45:38 AM app-mapFilter: Repository path is /tmp/zipdeploy/extracted
9:45:38 AM app-mapFilter: Running oryx build...
9:45:38 AM app-mapFilter: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.11 -p packagedir=.python_packages/lib/site-packages
9:45:39 AM app-mapFilter: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
9:45:39 AM app-mapFilter: You can report issues at https://github.com/Microsoft/Oryx/issues
9:45:39 AM app-mapFilter: Oryx Version: 0.2.20230210.1, Commit: a49c8f6b8abbe95b4356552c4c884dea7fd0d86e, ReleaseTagName: 20230210.1
9:45:39 AM app-mapFilter: Build Operation ID: ba77e43aee976359
9:45:39 AM app-mapFilter: Repository Commit : 0b64e5d8-9c9f-4af9-815a-d303aca1c889
9:45:39 AM app-mapFilter: OS Type           : bullseye
9:45:39 AM app-mapFilter: Image Type        : githubactions
9:45:39 AM app-mapFilter: Detecting platforms...
9:45:43 AM app-mapFilter: Detected following platforms:
9:45:43 AM app-mapFilter:   python: 3.11.8
9:45:43 AM app-mapFilter: Version '3.11.8' of platform 'python' is not installed. Generating script to install it...
9:45:43 AM app-mapFilter: Source directory     : /tmp/zipdeploy/extracted
9:45:43 AM app-mapFilter: Destination directory: /home/site/wwwroot
9:45:43 AM app-mapFilter: Downloading and extracting 'python' version '3.11.8' to '/tmp/oryx/platforms/python/3.11.8'...
9:45:43 AM app-mapFilter: Detected image debian flavor: bullseye.
9:45:44 AM app-mapFilter: Downloaded in 1 sec(s).
9:45:44 AM app-mapFilter: Verifying checksum...
9:45:44 AM app-mapFilter: Extracting contents...
9:45:48 AM app-mapFilter: performing sha512 checksum for: python...
9:45:48 AM app-mapFilter: Done in 5 sec(s).
9:45:48 AM app-mapFilter: image detector file exists, platform is python..
9:45:48 AM app-mapFilter: OS detector file exists, OS is bullseye..
9:45:48 AM app-mapFilter: Python Version: /tmp/oryx/platforms/python/3.11.8/bin/python3.11
9:45:48 AM app-mapFilter: Creating directory for command manifest file if it does not exist
9:45:48 AM app-mapFilter: Removing existing manifest file
9:45:48 AM app-mapFilter: Running pip install...

checking the logs of the current function (dummy function) in vscode just says 'connected'.

Is there another place I can check logs?

Thanks for your reply!
0 Kudos
EarlMedina
Esri Regular Contributor

Not what I was expecting, but let's try something. What happens when you install the package with no dependencies? The format for that in requirements.txt is:

 

<package> --install-option="--no-deps" 

 

0 Kudos
j-bromp
Regular Contributor

@EarlMedina Still running into the same error unfortunately, stuck on 'running pip install (2/4) then fails.

requirements.txt file looks like:

azure-functions
requests
arcgis --install-option="--no-deps"


I found something online that suggested containerising the whole thing with docker so am going to try doing that and will update if i make any progress

0 Kudos
RogerAsbury
Frequent Contributor

Curious what route you eventually took on this. I have the same issue and we got around it by setting up a ci/cd pipeline in Github, which seems to work, but it's frustrating that workarounds have to be found for things like this. Particularly since it means I can't deploy directly from VS Code, which can be handy sometimes.

--
Roger Asbury
Analyst/Programmer - Fairbanks North Star Borough
0 Kudos