Azure-Samples / chat-with-your-data-solution-accelerator

A Solution Accelerator for the RAG pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences. This includes most common requirements and best practices.
https://azure.microsoft.com/products/search
MIT License
640 stars 313 forks source link

Failed at Point of Container Build #480

Closed LukePWilkins closed 2 months ago

LukePWilkins commented 3 months ago

Describe the bug

At point of container build, the process fails

Expected behavior

No container is built

How does this bug make you feel?

Share a gif from giphy to tells us how you'd feel


Debugging information

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots

If applicable, add screenshots to help explain your problem.

Logs

#0 4.660 The following NEW packages will be installed:
#0 4.660   azure-functions-core-tools
#0 4.715 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
#0 4.715 Need to get 168 MB of archives.
#0 4.715 After this operation, 0 B of additional disk space will be used.
#0 4.715 Get:1 https://packages.microsoft.com/debian/11/prod bullseye/main amd64 azure-functions-core-tools amd64 4.0.5571-1 [168 MB]
#0 10.98 Fetched 168 MB in 3s (50.1 MB/s)
#0 10.99 dpkg-deb: error: archive '/var/cache/apt/archives/azure-functions-core-tools_4.0.5571-1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
#0 10.99 dpkg: error processing archive /var/cache/apt/archives/azure-functions-core-tools_4.0.5571-1_amd64.deb (--unpack):
#0 10.99  dpkg-deb --control subprocess returned error exit status 2
#0 11.04 Errors were encountered while processing:
#0 11.04  /var/cache/apt/archives/azure-functions-core-tools_4.0.5571-1_amd64.deb
#0 11.06 E: Sub-process /usr/bin/dpkg returned an error code (1)
#0 11.06 ERROR: Feature "Azure Functions Core Tools" (ghcr.io/jlaundry/devcontainer-features/azure-functions-core-tools) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/azure-functions-core-tools for help troubleshooting this error.
------
Dockerfile.extended:70
--------------------
  69 |     
  70 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=azure-functions-core-tools_4,target=/tmp/build-features-src/azure-functions-core-tools_4 \
  71 | >>>     cp -ar /tmp/build-features-src/azure-functions-core-tools_4 /tmp/dev-container-features \
  72 | >>>  && chmod -R 0755 /tmp/dev-container-features/azure-functions-core-tools_4 \
  73 | >>>  && cd /tmp/dev-container-features/azure-functions-core-tools_4 \
  74 | >>>  && chmod +x ./devcontainer-features-install.sh \
  75 | >>>  && ./devcontainer-features-install.sh \
  76 | >>>  && rm -rf /tmp/dev-container-features/azure-functions-core-tools_4
  77 |     
--------------------
error: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/azure-functions-core-tools_4 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/azure-functions-core-tools_4  && cd /tmp/dev-container-features/azure-functions-core-tools_4  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/azure-functions-core-tools_4" did not complete successfully: exit code: 1
[41388 ms] Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.56.2-1710887350621 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/python:1-3.11-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-chat-with-your-data-solution-accelerator-3d01b35833f1f2e31347906017ef6773ac64a30fb0dc85306afc4a15c0f16af6-features -f /tmp/devcontainercli-root/container-features/0.56.2-1710887350621/Dockerfile.extended /tmp/devcontainercli-root/empty-folder
[41388 ms]     at atA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.348.0/dist/spec-node/devContainersSpecCLI.js:464:1260)
[41388 ms]     at yH (/root/.vscode-remote-containers/dist/dev-containers-cli-0.348.0/dist/spec-node/devContainersSpecCLI.js:464:1002)
[41388 ms]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[41389 ms]     at async StA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.348.0/dist/spec-node/devContainersSpecCLI.js:481:3660)
[41389 ms]     at async ZC (/root/.vscode-remote-containers/dist/dev-containers-cli-0.348.0/dist/spec-node/devContainersSpecCLI.js:481:4775)
[41389 ms]     at async trA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.348.0/dist/spec-node/devContainersSpecCLI.js:614:11269)
[41389 ms]     at async erA (/root/.vscode-remote-containers/dist/dev-containers-cli-0.348.0/dist/spec-node/devContainersSpecCLI.js:614:11010)
[41398 ms] Exit code 1
[41398 ms] Start: Run in Host: docker rm -f cb64155144dacd68905b016648666fc3d26fdb697d76011255ce5f478013d0c7
[41401 ms] Command failed: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.348.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-ad4e3bae-bab0-4a2a-8047-1a005f51183c1710887334279 --workspace-folder /workspaces/chat-with-your-data-solution-accelerator --workspace-mount-consistency cached --id-label vsch.local.repository=https://github.com/azure-samples/chat-with-your-data-solution-accelerator --id-label vsch.local.repository.volume=chat-with-your-data-solution-accelerator-798e1b1c4cafef0adf40169ae01d318612925cda43582b440e22d12d9d1aa2a5 --id-label vsch.local.repository.folder=chat-with-your-data-solution-accelerator --id-label devcontainer.config_file=/workspaces/chat-with-your-data-solution-accelerator/.devcontainer/devcontainer.json --log-level debug --log-format json --config /workspaces/chat-with-your-data-solution-accelerator/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-07d932c7-5414-469c-911c-403c5c26dbc0.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=chat-with-your-data-solution-accelerator-798e1b1c4cafef0adf40169ae01d318612925cda43582b440e22d12d9d1aa2a5,target=/workspaces,external=true --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default off --mount-workspace-git-root
[41401 ms] Exit code 1
[41489 ms] Container server terminated (code: 137, signal: null).
---

Tasks

To be filled in by the engineer picking up the issue

RenSilvaAU commented 3 months ago

I have found the same behaviour. Here is my log:

3.585 E: Unable to locate package azure-functions-core-tools 3.587 ERROR: Feature "Azure Functions Core Tools" (ghcr.io/jlaundry/devcontainer-features/azure-functions-core-tools) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/azure-functions-core-tools for help troubleshooting this error.

[2024-03-20T05:33:53.606Z] Dockerfile.extended:70

69 |
70 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=azure-functions-core-tools_4,target=/tmp/build-features-src/azure-functions-core-tools_4 \ 71 | >>> cp -ar /tmp/build-features-src/azure-functions-core-tools_4 /tmp/dev-container-features \ 72 | >>> && chmod -R 0755 /tmp/dev-container-features/azure-functions-core-tools_4 \ 73 | >>> && cd /tmp/dev-container-features/azure-functions-core-tools_4 \ 74 | >>> && chmod +x ./devcontainer-features-install.sh \ 75 | >>> && ./devcontainer-features-install.sh \ 76 | >>> && rm -rf /tmp/dev-container-features/azure-functions-core-tools_4 77 |

[2024-03-20T05:33:53.606Z] ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/azure-functions-core-tools_4 /tmp/dev-container-features && chmod -R 0755 /tmp/dev-container-features/azure-functions-core-tools_4 && cd /tmp/dev-container-features/azure-functions-core-tools_4 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh && rm -rf /tmp/dev-container-features/azure-functions-core-tools_4" did not complete successfully: exit code: 1 [2024-03-20T05:33:53.616Z] Stop (5596 ms): Run: docker buildx build --load --build-context dev_containers_feature_content_source=/var/folders/nr/3xfqgn_92zg2gqms4k1wk5cw0000gn/T/devcontainercli/container-features/0.56.2-1710912820126 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/python:1-3.11-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-chat-with-your-data-solution-accelerator-c59a77fba0046f046f7ff326f34726e4ed656e5f8badfc60e2a7dab1952f7d35-features -f /var/folders/nr/3xfqgn_92zg2gqms4k1wk5cw0000gn/T/devcontainercli/container-features/0.56.2-1710912820126/Dockerfile.extended /Users/rensilva/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/empty-folder [2024-03-20T05:33:53.616Z] Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/var/folders/nr/3xfqgn_92zg2gqms4k1wk5cw0000gn/T/devcontainercli/container-features/0.56.2-1710912820126 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/python:1-3.11-bullseye --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-chat-with-your-data-solution-accelerator-c59a77fba0046f046f7ff326f34726e4ed656e5f8badfc60e2a7dab1952f7d35-features -f /var/folders/nr/3xfqgn_92zg2gqms4k1wk5cw0000gn/T/devcontainercli/container-features/0.56.2-1710912820126/Dockerfile.extended /Users/rensilva/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/empty-folder [2024-03-20T05:33:53.617Z] at atA (/Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js:464:1260) [2024-03-20T05:33:53.617Z] at yH (/Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js:464:1002) [2024-03-20T05:33:53.617Z] at process.processTicksAndRejections (node:internal/process/task_queues:95:5) [2024-03-20T05:33:53.617Z] at async StA (/Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js:481:3660) [2024-03-20T05:33:53.617Z] at async ZC (/Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js:481:4775) [2024-03-20T05:33:53.617Z] at async trA (/Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js:614:11269) [2024-03-20T05:33:53.617Z] at async erA (/Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js:614:11010) [2024-03-20T05:33:53.619Z] Stop (13899 ms): Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/rensilva/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-6a8cd707-84d1-4425-a4ab-2ba5acc1947e1710912818604 --workspace-folder /Users/rensilva/projects/current/chat-with-your-data-solution-accelerator --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/rensilva/projects/current/chat-with-your-data-solution-accelerator --id-label devcontainer.config_file=/Users/rensilva/projects/current/chat-with-your-data-solution-accelerator/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/rensilva/projects/current/chat-with-your-data-solution-accelerator/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root [2024-03-20T05:33:53.619Z] Exit code 1 [2024-03-20T05:33:53.621Z] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/rensilva/.vscode/extensions/ms-vscode-remote.remote-containers-0.348.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/rensilva/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-6a8cd707-84d1-4425-a4ab-2ba5acc1947e1710912818604 --workspace-folder /Users/rensilva/projects/current/chat-with-your-data-solution-accelerator --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/rensilva/projects/current/chat-with-your-data-solution-accelerator --id-label devcontainer.config_file=/Users/rensilva/projects/current/chat-with-your-data-solution-accelerator/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/rensilva/projects/current/chat-with-your-data-solution-accelerator/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root [2024-03-20T05:33:53.622Z] Exit code 1

ross-p-smith commented 3 months ago

Hi @RenSilvaAU and @LukePWilkins - I have seen this before on a MAC - the vscode Functions extension doesn't work on a mac.

Comment out line 8 of /workspaces/chat-with-your-data-solution-accelerator/.devcontainer/devcontainer.json

"ghcr.io/jlaundry/devcontainer-features/azure-functions-core-tools:1": {},

I have raised an issue here: - https://github.com/jlaundry/devcontainer-features/issues/14

ross-p-smith commented 2 months ago

@RenSilvaAU - I'm not sure if the merged fix above will work on a Mac (any chance you can pull and retry?) @LukePWilkins - This should be fixed for Windows now.

The root cause is : - https://github.com/Azure/azure-functions-core-tools/issues/3626

RenSilvaAU commented 2 months ago

@ross-p-smith , @LukePWilkins ,

Unfortunately the change did not correct the Mac build.

The solution that I've found was to force the devcontainer to build for amd64 then run it in a Mac with Rosetta.

I've implemented that solution in my fork, and created a pull request into the main repository.

I've tested with both Mac and PC, and the repo builds correctly for both cases.

Pull Request: https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator/pull/506

LukePWilkins commented 2 months ago

Thank you for looking into this.