features icon indicating copy to clipboard operation
features copied to clipboard

Conda devcontainer not support on Apple Silicon: `Architecture aarch64 unsupported`

Open cedricvidal opened this issue 1 year ago • 2 comments

Error logs

 > [dev_containers_target_stage 5/5] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=conda_0,target=/tmp/build-features-src/conda_0     cp -ar /tmp/build-features-src/conda_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/conda_0  && cd /tmp/dev-container-features/conda_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/conda_0:
0.112 ===========================================================================
0.112 Feature       : Conda
0.112 Description   : A cross-platform, language-agnostic binary package manager
0.112 Id            : ghcr.io/devcontainers/features/conda
0.112 Version       : 1.0.9
0.112 Documentation : https://github.com/devcontainers/
[2024-11-18T20:44:41.077Z] features/tree/main/src/conda
0.112 Options       :
0.112     VERSION="3.10"
0.112     ADDCONDAFORGE="false"
0.112 ===========================================================================
0.115 + export DEBIAN_FRONTEND=noninteractive
0.115 + DEBIAN_FRONTEND=noninteractive
0.116 + rm -rf '/var/lib/apt/lists/*'
0.117 ++ id -u
0.118 + '[' 0 -ne 0 ']'
0.118 + rm -f /etc/profile.d/00-restore-env.sh
0.119 ++ sh -lc 'echo $PATH'
0.122 + echo 'export PATH=/opt/conda/bin:/usr/local/python/current/bin:/usr/local/py-utils/bin:/usr/local/share/nvm/current/bin:/usr/local/bin:$PATH'
0.122 + chmod +x /etc/profile.d/00-restore-env.sh
0.123 + '[' vscode = auto ']'
0.123 + '[' vscode = automatic ']'
0.123 + '[' vscode = none ']'
0.123 + id -u vscode
0.123 ++ uname -m
0.124 + architecture=aarch64
0.124 + '[' aarch64 '!=' x86_64 ']'
0.124 + echo '(!) Architecture aarch64 unsupported'
0.124 (!) Architecture aarch64 unsupported
0.124 + exit 1
0.125 ERROR: Feature "Conda" (ghcr.io/devcontainers/features/co
[2024-11-18T20:44:41.077Z] nda) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/conda for help troubleshooting this error.
------
[2024-11-18T20:44:41.079Z] Dockerfile.extended:26
--------------------
  25 |     ENV PATH="/opt/conda/bin:${PATH}"
  26 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=conda_0,target=/tmp/build-features-src/conda_0 \
  27 | >>>     cp -ar /tmp/build-features-src/conda_0 /tmp/dev-container-features \
  28 | >>>  && chmod -R 0755 /tmp/dev-container-features/conda_0 \
  29 | >>>  && cd /tmp/dev-container-features/conda_0 \
  30 | >>>  && chmod +x ./devcontainer-features-install.sh \
  31 | >>>  && ./devcontainer-features-install.sh \
  32 | >>>  && rm -rf /tmp/dev-container-features/conda_0
[2024-11-18T20:44:41.079Z]   33 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/conda_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/conda_0  && cd /tmp/dev-container-features/conda_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/conda_0" did not complete successfully: exit code: 1

cedricvidal avatar Nov 18 '24 20:11 cedricvidal

Hi @cedricvidal, Anaconda doesn't support an aarch64 build yet. See here and can look through more information in similar issues raised by users.

gauravsaini04 avatar Nov 21 '24 02:11 gauravsaini04

Miniconda supports arm64 (aarch64) architecture so it can be used instead of conda debian package that is only available for amd64 (x86_64) architecture.

Currently this limitation should be noticed in the NOTES.

rubensa avatar Nov 26 '24 15:11 rubensa

I got same error when using conda feature. I check anaconda website, find they do have mac installer: https://www.anaconda.com/docs/getting-started/anaconda/install#macos-linux-installation. Why we still got this error:

 > [dev_containers_target_stage 5/5] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=conda_0,target=/tmp/build-features-src/conda_0     cp -ar /tmp/build-features-src/conda_0 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/conda_0  && cd /tmp/dev-container-features/conda_0  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/conda_0:
0.122 ===========================================================================
0.122 Feature       : Conda
0.122 Description   : A cross-platform, language-agnostic binary package manager
0.122 Id            : ghcr.io/devcontainers/features/conda
0.122 Version       : 1.0.9
0.122 Documentation : https://github.com/devcontainers/features/tree/main/src/conda
0.122 Options       :
0.122     VERSION="latest"
0.122     ADDCONDAFORGE="false"
0.122 ===========================================================================
0.123 + export 
[2025-03-18T22:34:34.267Z] DEBIAN_FRONTEND=noninteractive
0.123 + DEBIAN_FRONTEND=noninteractive
0.123 + rm -rf '/var/lib/apt/lists/*'
0.124 ++ id -u
0.124 + '[' 0 -ne 0 ']'
0.124 + rm -f /etc/profile.d/00-restore-env.sh
0.125 ++ sh -lc 'echo $PATH'
0.126 + echo 'export PATH=$PATH'
0.127 + chmod +x /etc/profile.d/00-restore-env.sh
0.127 + '[' root = auto ']'
0.127 + '[' root = automatic ']'
0.127 + '[' root = none ']'
0.127 + id -u root
0.127 ++ uname -m
0.128 + architecture=aarch64
0.128 + '[' aarch64 '!=' x86_64 ']'
0.128 + echo '(!) Architecture aarch64 unsupported'
0.128 (!) Architecture aarch64 unsupported
0.128 + exit 1
[2025-03-18T22:34:34.267Z] 
0.128 ERROR: Feature "Conda" (ghcr.io/devcontainers/features/conda) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/conda for help troubleshooting this error.
------

Roy-Kid avatar Mar 18 '25 22:03 Roy-Kid

Thank you for the issue & further details. For the conda feature unfortunately no arm64 build available for the moment in the anaconda repo for linux. As alternative either anaconda or miniconda pre-built devcontainer images can be used as both support arm64 architecture & also we are going to add arm64/ aarch64 support for anaconda devcontainer feature.

Kaniska244 avatar Apr 21 '25 10:04 Kaniska244

Closing this issue as the anaconda PR has been merged.

Kaniska244 avatar Aug 13 '25 08:08 Kaniska244