Closed raffertyuy closed 2 months ago
I'm getting the same error in my own forked repo. It's the same if you try to run the Dev Container locally. I believe that if you scroll up you'll see the actual cause of the problem. For me, it looks like it's a pip
dependency conflict:
#13 ERROR: process "/bin/sh -c pip install -r requirements.txt && pip install keyrings.alt dbus-python ipython ipykernel" did not complete successfully: exit code: 1
------
> [dev_container_auto_added_stage_label 4/6] RUN pip install -r requirements.txt && pip install keyrings.alt dbus-python ipython ipykernel:
53.13 promptflow-evals 0.3.0 depends on promptflow-devkit<2.0.0
53.13 promptflow-azure 1.11.0 depends on promptflow-devkit<2.0.0 and >=1.11.0
53.13 promptflow 1.10.0 depends on promptflow-devkit==1.10.0
53.13 promptflow-evals 0.3.0 depends on promptflow-devkit<2.0.0
53.13 promptflow-azure 1.10.1 depends on promptflow-devkit<2.0.0 and >=1.10.1
53.13
53.13 To fix this you could try to:
53.13 1. loosen the range of package versions you've specified
53.13 2. remove package versions to allow pip attempt to solve the dependency conflict
53.13
------
Dockerfile-with-features:21
--------------------
20 | COPY requirements.txt .
21 | >>> RUN pip install -r requirements.txt \
22 | >>> && pip install keyrings.alt dbus-python ipython ipykernel
23 |
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install -r requirements.txt && pip install keyrings.alt dbus-python ipython ipykernel" did not complete successfully: exit code: 1
{"outcome":"error","message":"Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.56.1-1716978672495/Dockerfile-with-features -t vsc-contoso-chat-830c6938fafd08eb2da0d2669867fe5e315e2dac15ac6285f83a50273840073a --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.56.1-1716978672495 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/contoso-chat","description":"An error occurred building the image."}
It looks like the promptflow
dependency was pinned 2 weeks ago to version 1.10.0
, which requires the same version of promptflow-devkit
. There seems to be a conflict when installing deps for promptflow-evals
, not allowing us to fetch promptflow-azure==1.10.0
. @cassiebreviu, any insights there?
Pasting here the entire pip install
trace:
@raffertyuy explicitly pinning promptflow-azure==1.10.0
in requirements.txt unblocks the build for me, feel free to try it.
It might be worth investigating this further, however, to detect the root cause of the problem.
Thanks @phoevos ! I tried in https://github.com/raffertyuy/fork-contoso-chat and it didn't work for me. Attached is the creation log. I believe the culprit are these lines. It still doesn't explain why I can run it properly on the main repo but on on forked though.
2024-05-31 08:33:03.988Z: #13 67.20 ERROR: Cannot install -r requirements.txt (line 10), -r requirements.txt (line 5) and promptflow.evals because these package versions have conflicting dependencies.2024-05-31 08:33:03.995Z:
2024-05-31 08:33:04.139Z: #13 67.20
#13 67.20 The conflict is caused by:
#13 67.20 promptflow 1.10.0 depends on promptflow-devkit==1.10.0
#13 67.20 promptflow-evals 0.3.0 depends on promptflow-devkit<2.0.0
#13 67.20 promptflow-azure 1.11.0 depends on promptflow-devkit<2.0.0 and >=1.11.0
#13 67.20 promptflow 1.10.0 depends on promptflow-devkit==1.10.0
#13 67.20 promptflow-evals 0.3.0 depends on promptflow-devkit<2.0.0
#13 67.20 promptflow-azure 1.10.1 depends on promptflow-devkit<2.0.0 and >=1.10.1
#13 67.20
#13 67.20 To fix this you could try to:
#13 67.20 1. loosen the range of package versions you've specified
#13 67.20 2. remove package versions to allow pip attempt to solve the dependency conflict
#13 67.20
#13 67.20 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2024-05-31 08:33:04.917Z: #13 ERROR: process "/bin/sh -c pip install -r requirements.txt && pip install keyrings.alt dbus-python ipython ipykernel" did not complete successfully: exit code: 1
2024-05-31 08:33:05.137Z: ------
> [dev_container_auto_added_stage_label 4/6] RUN pip install -r requirements.txt && pip install keyrings.alt dbus-python ipython ipykernel:2024-05-31 08:33:05.147Z:
67.20 promptflow-azure 1.11.0 depends on promptflow-devkit<2.0.0 and >=1.11.0
67.20 promptflow 1.10.0 depends on promptflow-devkit==1.10.0
67.20 promptflow-evals 0.3.0 depends on promptflow-devkit<2.0.0
67.20 promptflow-azure 1.10.1 depends on promptflow-devkit<2.0.0 and >=1.10.1
67.20
67.20 To fix this you could try to:
67.20 1. loosen the range of package versions you've specified
67.20 2. remove package versions to allow pip attempt to solve the dependency conflict
67.20
67.20 ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Hey @raffertyuy, I see that it is indeed the same issue. Looking at your code, I see that you updated contoso_chat/requirements.txt
; that won't work indeed!
The error is triggered while trying to pip install
the top-level requirements.txt
file as seen in the trace above!
https://github.com/Azure-Samples/contoso-chat/blob/main/requirements.txt
This is where your change should be added (same as in the linked commit/PR above). Note that the file you updated is only used by the PS postprovision script that is run only on Windows servers (could be stale?)
Hey thanks for replying quickly. I don't know why I didn't see that requirements.txt
file at the root folder. I just tried now and it works!
I still find it odd that codespace containers build properly on this main repo but not on forked repos, but at least I'm not unblocked to try this out. Thanks a lot!
Without having much insight into Codespaces, a difference could be that when starting one from the upstream repo, you get a prebuilt environment. In fact, trying it just now and looking into the creation log, I see that it was created 2 weeks ago, following the latest pushes. I would assume that some of the dependencies have changed and given that not all of them are pinned in requirements.txt
you end up with a different environment if you try rebuilding the image. For instance, here are the differences between said Codespace and my local devcontainer (note that I pinned promptflow-azure
locally).
Some potentially interesting points could be the promptflow-evals
version bump, the extra MLFlow-related packages, or the fact that promptflow-azure
wasn't even there:
$ diff codespaces devcontainer
0a1,4
> aiohttp==3.9.5
> aiohttp-retry==2.8.3
> aiosignal==1.3.1
> alembic==1.13.1
2,3c6,7
< annotated-types==0.6.0
< anyio==4.3.0
---
> annotated-types==0.7.0
> anyio==4.4.0
7c11
< azure-ai-ml==1.16.0
---
> azure-ai-ml==1.16.1
17,18c21,22
< azure-storage-blob==12.20.0
< azure-storage-file-datalake==12.15.0
---
> azure-storage-blob==12.19.0
> azure-storage-file-datalake==12.14.0
20c24,25
< backports.tarfile==1.1.1
---
> azureml-mlflow==1.56.0
> backports.tarfile==1.2.0
31a37
> contourpy==1.2.1
32a39
> cycler==0.12.1
39a47
> docker==7.1.0
45c53
< fastapi-cli==0.0.3
---
> fastapi-cli==0.0.4
52a61,62
> fonttools==4.52.4
> frozenlist==1.4.1
58a69,71
> graphene==3.3
> graphql-core==3.2.3
> graphql-relay==3.2.0
59a73
> gunicorn==22.0.0
75a90
> joblib==1.4.2
76a92,93
> jsonpath-ng==1.6.1
> jsonpickle==3.0.4
79c96
< jupyter_client==8.6.1
---
> jupyter_client==8.6.2
83a101,103
> kiwisolver==1.4.5
> Mako==1.3.5
> Markdown==3.6
86a107
> matplotlib==3.9.0
90c111,112
< mlflow-skinny==2.12.2
---
> mlflow==2.13.0
> mlflow-skinny==2.13.0
94a117
> multidict==6.0.5
101c124
< openai==1.30.1
---
> openai==1.30.4
119a143
> ply==3.11
121c145
< prompt-toolkit==3.0.43
---
> prompt_toolkit==3.0.45
122a147
> promptflow-azure==1.10.0
125c150
< promptflow-evals==0.1.0.dev0
---
> promptflow-evals==0.3.0
132a158
> pyarrow==15.0.2
136,137c162,163
< pydantic==2.7.1
< pydantic_core==2.18.2
---
> pydantic==2.7.2
> pydantic_core==2.18.3
140a167
> pyparsing==3.1.2
146a174
> querystring-parser==1.2.4
149c177
< requests==2.31.0
---
> requests==2.32.2
155a184,185
> scikit-learn==1.5.0
> scipy==1.13.1
167a198
> threadpoolctl==3.5.0
174c205
< typing_extensions==4.11.0
---
> typing_extensions==4.12.0
178c209
< uvicorn==0.29.0
---
> uvicorn==0.30.0
181c212
< watchfiles==0.21.0
---
> watchfiles==0.22.0
183a215
> websocket-client==1.8.0
187c219,220
< zipp==3.18.2
---
> yarl==1.9.4
> zipp==3.19.0
I had no such issues building and launching Codespaces from a forked main branch today.
The codespaces dev container can't provision properly when forking from this repo. Logging here as problem seems to be specific to this repo.
How to Reproduce
You may also try creating codespaces on https://github.com/raffertyuy/fork-contoso-chat to reproduce.
Test attempts