Mentions légales du service

Skip to content
Snippets Groups Projects

Fix Binder instance run

Closed GILLES Sebastien requested to merge sgilles/gettingstartedwithmoderncpp:112_mr into master
1 unresolved thread

In MR !62 (merged); I broke the generation of Binder instance, as strangely enough the Conda environment that works on Linux and for Docker images utterly fail in Binder (and the version that works for Binder fails locally and for Linux images... :thinking: )

Here I fix this, albeit not in the prettiest possible way (basically I provide two different Yaml environments: one for local/Docker and another for Binder.

I have updated the README to reflect both changes.

Note: I have in fact locally worked on top of the branch provided in !62 (merged) and have cherry-picked the commits to put them on top of current master branch.

Merge request reports

Approval is optional

Closed by GILLES SebastienGILLES Sebastien 1 year ago (Feb 15, 2024 10:11am UTC)

Merge details

  • The changes were not merged into master.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 name: training_cpp
2 channels:
3 - conda-forge
4 dependencies:
5 - jupyterlab
6 - xeus-cling
7 - gcc=10.4
  • I tried again building the xeus-cling Docker image with gcc 10.4, and I got:

    ➜ docker build -f docker/Dockerfile.xeus-cling -t xeus-cling:local .
    [+] Building 34.8s (10/10) FINISHED                                                                                                                                                                                           docker:desktop-linux
     => [internal] load build definition from Dockerfile.xeus-cling                                                                                                                                                                               0.0s
     => => transferring dockerfile: 1.02kB                                                                                                                                                                                                        0.0s
     => [internal] load metadata for docker.io/continuumio/miniconda3:latest                                                                                                                                                                      1.6s
     => [internal] load .dockerignore                                                                                                                                                                                                             0.0s
     => => transferring context: 102B                                                                                                                                                                                                             0.0s
     => [1/6] FROM docker.io/continuumio/miniconda3:latest@sha256:5ee0ed861bce8f67acb0a3e8a416891781db54302d93bf20a3c6301d7683d7b9                                                                                                                0.0s
     => [internal] load build context                                                                                                                                                                                                             0.0s
     => => transferring context: 158B                                                                                                                                                                                                             0.0s
     => CACHED [2/6] RUN useradd --create-home dev_cpp                                                                                                                                                                                            0.0s
     => CACHED [3/6] RUN chown dev_cpp:dev_cpp /opt/conda                                                                                                                                                                                         0.0s
     => CACHED [4/6] WORKDIR /home/dev_cpp/training_cpp                                                                                                                                                                                           0.0s
     => [5/6] COPY environment.yml .                                                                                                                                                                                                              0.0s
     => ERROR [6/6] RUN conda env create -f environment.yml                                                                                                                                                                                      33.2s
    ------                                                                                                                                                                                                                                             
     > [6/6] RUN conda env create -f environment.yml:                                                                                                                                                                                                  
    0.850 Channels:                                                                                                                                                                                                                                    
    0.850  - conda-forge                                                                                                                                                                                                                               
    0.850  - defaults                                                                                                                                                                                                                                  
    0.850 Platform: linux-aarch64                                                                                                                                                                                                                      
    0.850 Collecting package metadata (repodata.json): ...working... done
    22.82 Solving environment: ...working... failed
    26.12 Channels:
    26.12  - conda-forge
    26.12  - defaults
    26.12 Platform: linux-aarch64
    26.12 Collecting package metadata (repodata.json): ...working... done
    29.88 Solving environment: ...working... failed
    33.07 
    33.07 LibMambaUnsatisfiableError: Encountered problems while solving:
    33.07   - package xeus-cling-0.10.0-h9449efa_2 requires cling >=0.7,<0.8.0a0, but none of the providers can be installed
    33.07 
    33.07 Could not solve for environment specs
    33.07 The following packages are incompatible
    33.07 ├─ gcc 10.4**  is installable and it requires
    33.07 │  └─ gcc_impl_linux-aarch64 10.4.0.*  with the potential options
    33.07 │     ├─ gcc_impl_linux-aarch64 10.4.0 would require
    33.07 │     │  └─ binutils_impl_linux-aarch64 2.36.1.* , which can be installed;
    33.07 │     ├─ gcc_impl_linux-aarch64 10.4.0 would require
    33.07 │     │  └─ binutils_impl_linux-aarch64 >=2.39  but there are no viable options
    33.07 │     │     ├─ binutils_impl_linux-aarch64 2.39 conflicts with any installable versions previously reported;
    33.07 │     │     ├─ binutils_impl_linux-aarch64 2.39 would require
    33.07 │     │     │  └─ ld_impl_linux-aarch64 2.39 h16cd69b_1, which requires
    33.07 │     │     │     └─ binutils_impl_linux-aarch64 2.39 , which conflicts with any installable versions previously reported;
    33.07 │     │     └─ binutils_impl_linux-aarch64 2.40 would require
    33.07 │     │        └─ ld_impl_linux-aarch64 2.40 h2d8c526_0, which requires
    33.07 │     │           └─ binutils_impl_linux-aarch64 2.40 , which conflicts with any installable versions previously reported;
    33.07 │     └─ gcc_impl_linux-aarch64 10.4.0, which can be installed;
    33.07 └─ xeus-cling is not installable because there are no viable options
    33.07    ├─ xeus-cling 0.10.0 would require
    33.07    │  └─ cling >=0.7,<0.8.0a0  but there are no viable options
    33.07    │     ├─ cling [0.7|0.8] would require
    33.07    │     │  └─ gxx_linux-aarch64 9.*  but there are no viable options
    33.07    │     │     ├─ gxx_linux-aarch64 9.3.0 would require
    33.07    │     │     │  ├─ gcc_linux-aarch64 [9.3.0 h5551ba8_31|9.3.0 h5551ba8_32|9.3.0 h5551ba8_33], which requires
    33.07    │     │     │  │  └─ gcc_impl_linux-aarch64 9.3.0.* , which conflicts with any installable versions previously reported;
    33.07    │     │     │  └─ gxx_impl_linux-aarch64 9.3.0.*  but there are no viable options
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.3.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.3.0 h1b5c6bf_14, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.3.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.3.0 h1b5c6bf_15, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.3.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.3.0 h9730ee9_12, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.3.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.3.0 h9730ee9_13, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.3.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.3.0 h88a1608_19, which conflicts with any installable versions previously reported;
    33.07    │     │     │     └─ gxx_impl_linux-aarch64 9.3.0 would require
    33.07    │     │     │        └─ gcc_impl_linux-aarch64 9.3.0 h5b547fa_17, which conflicts with any installable versions previously reported;
    33.07    │     │     ├─ gxx_linux-aarch64 9.4.0 would require
    33.07    │     │     │  ├─ binutils_linux-aarch64 [2.36 h7854541_0|2.36 h7854541_1|...|2.36 h7854541_9], which requires
    33.07    │     │     │  │  └─ binutils_impl_linux-aarch64 2.36.* , which can be installed;
    33.07    │     │     │  ├─ gcc_linux-aarch64 [9.4.0 h9fa865e_0|9.4.0 h9fa865e_1|...|9.4.0 h9fa865e_9], which requires
    33.07    │     │     │  │  └─ gcc_impl_linux-aarch64 9.4.0.*  but there are no viable options
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 [9.4.0|9.5.0] would require
    33.07    │     │     │  │     │  └─ binutils_impl_linux-aarch64 2.36.1.* , which can be installed;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     ├─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  │     └─ gcc_impl_linux-aarch64 9.4.0 conflicts with any installable versions previously reported;
    33.07    │     │     │  └─ gxx_impl_linux-aarch64 9.4.0.*  but there are no viable options
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 [9.4.0|9.5.0] would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 [9.4.0 h603953f_3|9.5.0 h37f5d0c_16], which cannot be installed (as previously explained);
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_10, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_11, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_12, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_13, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_14, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_15, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_16, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_4, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_5, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_6, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_7, which conflicts with any installable versions previously reported;
    33.07    │     │     │     ├─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │     │  └─ gcc_impl_linux-aarch64 9.4.0 h603953f_8, which conflicts with any installable versions previously reported;
    33.07    │     │     │     └─ gxx_impl_linux-aarch64 9.4.0 would require
    33.07    │     │     │        └─ gcc_impl_linux-aarch64 9.4.0 h603953f_9, which conflicts with any installable versions previously reported;
    33.07    │     │     └─ gxx_linux-aarch64 9.5.0 would require
    33.07    │     │        ├─ binutils_linux-aarch64 [2.36 h7854541_10|2.39 h489c705_11|2.39 h489c705_12|2.39 h489c705_13] with the potential options
    33.07    │     │        │  ├─ binutils_linux-aarch64 2.39 would require
    33.07    │     │        │  │  └─ binutils_impl_linux-aarch64 2.39.*  but there are no viable options
    33.07    │     │        │  │     ├─ binutils_impl_linux-aarch64 2.39 conflicts with any installable versions previously reported;
    33.07    │     │        │  │     └─ binutils_impl_linux-aarch64 2.39, which cannot be installed (as previously explained);
    33.07    │     │        │  └─ binutils_linux-aarch64 2.36, which can be installed (as previously explained);
    33.07    │     │        ├─ gcc_linux-aarch64 [9.5.0 hf6054ea_10|9.5.0 hf6054ea_11|9.5.0 hf6054ea_12|9.5.0 hf6054ea_13], which requires
    33.07    │     │        │  └─ gcc_impl_linux-aarch64 9.5.0.*  but there are no viable options
    33.07    │     │        │     ├─ gcc_impl_linux-aarch64 [9.4.0|9.5.0], which cannot be installed (as previously explained);
    33.07    │     │        │     ├─ gcc_impl_linux-aarch64 9.5.0 would require
    33.07    │     │        │     │  └─ binutils_impl_linux-aarch64 >=2.39  but there are no viable options
    33.07    │     │        │     │     ├─ binutils_impl_linux-aarch64 2.39 conflicts with any installable versions previously reported;
    33.07    │     │        │     │     ├─ binutils_impl_linux-aarch64 2.39, which cannot be installed (as previously explained);
    33.07    │     │        │     │     └─ binutils_impl_linux-aarch64 2.40, which cannot be installed (as previously explained);
    33.07    │     │        │     └─ gcc_impl_linux-aarch64 9.5.0 conflicts with any installable versions previously reported;
    33.07    │     │        └─ gxx_impl_linux-aarch64 9.5.0.*  but there are no viable options
    33.07    │     │           ├─ gxx_impl_linux-aarch64 9.5.0 would require
    33.07    │     │           │  └─ gcc_impl_linux-aarch64 [9.5.0 h0c0692e_18|9.5.0 h0c0692e_19], which cannot be installed (as previously explained);
    33.07    │     │           ├─ gxx_impl_linux-aarch64 [9.4.0|9.5.0], which cannot be installed (as previously explained);
    33.07    │     │           └─ gxx_impl_linux-aarch64 9.5.0 would require
    33.07    │     │              └─ gcc_impl_linux-aarch64 9.5.0 h37f5d0c_17, which conflicts with any installable versions previously reported;
    33.07    │     └─ cling 0.7 would require
    33.07    │        └─ gxx_linux-aarch64 7.*  but there are no viable options
    33.07    │           ├─ gxx_linux-aarch64 7.3.0 would require
    33.07    │           │  └─ gxx_impl_linux-aarch64 7.3.0.* , which requires
    33.07    │           │     ├─ gcc_impl_linux-aarch64 7.3.0 hfeefbbc_5, which conflicts with any installable versions previously reported;
    33.07    │           │     └─ libstdcxx-ng 5.4.*|7.2.*|7.3.*|8.2.*|9.1.*|9.2.* , which can be installed;
    33.07    │           ├─ gxx_linux-aarch64 7.5.0 would require
    33.07    │           │  ├─ binutils_linux-aarch64 [2.35 h0a73b0c_29|2.35 h65ed0b7_28|2.35 hcd9001c_30], which requires
    33.07    │           │  │  └─ binutils_impl_linux-aarch64 2.35.* , which can be installed;
    33.07    │           │  └─ gxx_impl_linux-aarch64 7.5.0.*  but there are no viable options
    33.07    │           │     ├─ gxx_impl_linux-aarch64 7.5.0 would require
    33.07    │           │     │  └─ gcc_impl_linux-aarch64 7.5.0 h9730ee9_10, which conflicts with any installable versions previously reported;
    33.07    │           │     ├─ gxx_impl_linux-aarch64 7.5.0 would require
    33.07    │           │     │  └─ gcc_impl_linux-aarch64 7.5.0 h8c076ac_18, which conflicts with any installable versions previously reported;
    33.07    │           │     ├─ gxx_impl_linux-aarch64 7.5.0 would require
    33.07    │           │     │  └─ gcc_impl_linux-aarch64 7.5.0 h8c076ac_20, which conflicts with any installable versions previously reported;
    33.07    │           │     ├─ gxx_impl_linux-aarch64 7.5.0 would require
    33.07    │           │     │  └─ gcc_impl_linux-aarch64 7.5.0 hf17dfc6_14, which conflicts with any installable versions previously reported;
    33.07    │           │     └─ gxx_impl_linux-aarch64 7.5.0 would require
    33.07    │           │        └─ gcc_impl_linux-aarch64 7.5.0 h7315dce_17, which conflicts with any installable versions previously reported;
    33.07    │           ├─ gxx_linux-aarch64 7.5.0 would require
    33.07    │           │  ├─ binutils_linux-aarch64 [2.36 h7854541_31|2.36 h7854541_32|2.36 h7854541_33], which can be installed (as previously explained);
    33.07    │           │  ├─ gcc_linux-aarch64 [7.5.0 hc7207d9_31|7.5.0 hc7207d9_32|7.5.0 hc7207d9_33], which requires
    33.07    │           │  │  └─ gcc_impl_linux-aarch64 7.5.0.* , which conflicts with any installable versions previously reported;
    33.07    │           │  └─ gxx_impl_linux-aarch64 7.5.0.* , which cannot be installed (as previously explained);
    33.07    │           └─ gxx_linux-aarch64 7.5.0 would require
    33.07    │              ├─ binutils_linux-aarch64 [2.34 h9fe6929_19|2.34 h9fe6929_20|...|2.34 hfcdf779_27], which requires
    33.07    │              │  └─ binutils_impl_linux-aarch64 2.34.* , which can be installed;
    33.07    │              └─ gxx_impl_linux-aarch64 7.5.0.* , which cannot be installed (as previously explained);
    33.07    ├─ xeus-cling [0.10.0|0.10.1|0.11.0] would require
    33.07    │  ├─ cling >=0.7,<0.8.0a0 , which cannot be installed (as previously explained);
    33.07    │  └─ libstdcxx-ng >=9.3.0 , which conflicts with any installable versions previously reported;
    33.07    └─ xeus-cling [0.11.0|0.12.0|0.12.1|0.13.0] would require
    33.07       └─ cling >=0.8,<0.9.0a0 , which cannot be installed (as previously explained).
    33.07 
    ------
    Dockerfile.xeus-cling:15
    --------------------
      13 |     WORKDIR /home/${USER}/training_cpp
      14 |     COPY environment.yml .
      15 | >>> RUN conda env create -f environment.yml 
      16 |     
      17 |     # Make RUN commands use the new environment:
    --------------------
    ERROR: failed to solve: process "/bin/sh -c conda env create -f environment.yml" did not complete successfully: exit code: 1
    
    View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/nv4nwh156xtsm8fjxxvgx1dyo
  • cf. mattermost discussion, we should give a try to remove gcc in conda environment as xeus-cling embeds cling that comes with a working clang compiler (9.0.1).

  • Yes I agree. MR in this current form should be rejected; I'll cherry-pick next week some changes done in the README and will submit them in another MR.

  • Please register or sign in to reply
    Loading