chat-with-your-data-solution-accelerator icon indicating copy to clipboard operation
chat-with-your-data-solution-accelerator copied to clipboard

DevContainer doesn't work on Mac.

Open gaurarpit opened this issue 1 year ago • 5 comments

Describe the bug

DevContainer doesn't work on Mac. The image of python version needed inside the devcontainer doesn't build on ARM. Changing it causes the azure-functions-core-tools to break.

Expected behavior

The devcontainer should work on Mac devices with ARM processor.

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. Get a Mac ARM processor laptop
  2. Open the repository in devcontainer on VSCode Code Editor
  3. Do azd provision and the below error is thrown
  4. See error

Screenshots

SCR-20240508-lodo

gaurarpit avatar May 09 '24 16:05 gaurarpit

Root cause seems to be this: https://github.com/Azure-Samples/azure-search-openai-demo/issues/195#issuecomment-1552219371

We suspect that the azurebicep OR azure-functions-core-tools installer might be the reason.

gaurarpit avatar May 09 '24 16:05 gaurarpit

@gaurarpit or @liammoat - are you able to pull my branch and see if it builds on your Mac?

ross-p-smith avatar May 16 '24 11:05 ross-p-smith

@gaurarpit or @liammoat - are you able to pull my branch and see if it builds on your Mac?

Previously, the dev container would launch - but fail with azd. With your branch, the dev container image now fails here: image

liammoat avatar May 16 '24 13:05 liammoat

Would you have a workaround for this bug?

mikqs avatar May 17 '24 18:05 mikqs

I have the latest merge and an M3 Mac

=> ERROR [dev_containers_target_stage 8/9] RUN --mount=type=bind,from=de  2.7s
------
 > [dev_containers_target_stage 8/9] 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     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:
#0 0.081 ===========================================================================
#0 0.081 Feature       : Azure Functions Core Tools
#0 0.081 Description   : Installs the Azure Functions Core Tools along with needed dependencies. Useful for developing Azure Function apps inside codespaces.
#0 0.081 Id            : ghcr.io/jlaundry/devcontainer-features/azure-functions-core-tools
#0 0.081 Version       : 1.0.0
#0 0.081 Documentation : https://github.com/devcontainers/features/tree/main/src/azure-functions-core-tools
#0 0.081 Options       :
#0 0.081     VERSION="latest"
#0 0.081 ===========================================================================
#0 0.086 (*) Installing Azure Functions Core Tools...
#0 0.302 MICROSOFT_GPG_KEYS_URI=https://packages.microsoft.com/keys/microsoft.asc
#0 0.595 Get:1 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]
#0 0.672 Get:2 https://packages.microsoft.com/repos/azure-cli bookworm InRelease [3576 B]
#0 0.672 Get:3 https://dl.yarnpkg.com/debian stable/main all Packages [10.9 kB]
#0 0.713 Get:4 https://dl.yarnpkg.com/debian stable/main arm64 Packages [10.9 kB]
#0 0.717 Get:5 http://deb.debian.org/debian bookworm InRelease [151 kB]
#0 0.726 Get:6 https://packages.microsoft.com/debian/12/prod bookworm InRelease [3618 B]
#0 0.811 Get:7 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
#0 0.831 Get:8 https://packages.microsoft.com/repos/microsoft-debian-bookworm-prod bookworm InRelease [3618 B]
#0 0.858 Get:9 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
#0 0.868 Get:10 https://packages.microsoft.com/repos/azure-cli bookworm/main arm64 Packages [1226 B]
#0 0.873 Get:11 https://packages.microsoft.com/debian/12/prod bookworm/main all Packages [342 B]
#0 0.886 Get:12 https://packages.microsoft.com/debian/12/prod bookworm/main arm64 Packages [9204 B]
#0 0.897 Get:13 https://packages.microsoft.com/repos/microsoft-debian-bookworm-prod bookworm/main all Packages [342 B]
#0 0.906 Get:14 https://packages.microsoft.com/repos/microsoft-debian-bookworm-prod bookworm/main arm64 Packages [9204 B]
#0 0.909 Get:15 http://deb.debian.org/debian bookworm/main arm64 Packages [8685 kB]
#0 1.669 Get:16 http://deb.debian.org/debian bookworm-updates/main arm64 Packages [13.7 kB]
#0 1.711 Get:17 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [153 kB]
#0 2.251 Fetched 9176 kB in 2s (5097 kB/s)
#0 2.251 Reading package lists...
#0 2.462 Reading package lists...
#0 2.670 Building dependency tree...
#0 2.732 Reading state information...
#0 2.735 E: Unable to locate package azure-functions-core-tools
#0 2.736 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.

mikqs avatar May 17 '24 19:05 mikqs