Jupyter-repo2docker build failure: Problem: package libgomp-9.3.0-h2828fa1_18 requires _libgcc_mutex 0.1 conda_forge, but none of the providers can be installed

I am attempting to build a Docker image for deployment in JupyterHub using jupyter-repo2docker and the build is failing with the following error:

Encountered problems while solving.
Problem: package libgomp-9.3.0-h2828fa1_18 requires _libgcc_mutex 0.1 conda_forge, but none of the providers can be installed
Problem: package libgcc-ng-9.1.0-hdf63c60_0 requires _libgcc_mutex * main, but none of the providers can be installed

The following is the environment.yaml file used for this build. I exported it from the environment that I would like to replicate in JupyterHub. Note that I have tried adding conda-forge to the channels list and removing the environment name specification (line 1):

name: base
channels:

  • defaults
    dependencies:
  • conda-forge::_libgcc_mutex=0.1=main
  • _tflow_select=2.1.0=gpu
  • absl-py=0.12.0=py38h06a4308_0
  • aio{removed}=3.7.4=py38h27cfd23_1
  • astunparse=1.6.3=py_0
  • async-timeout=3.0.1=py38h06a4308_0
  • attrs=21.2.0=pyhd3eb1b0_0
  • blas=1.0=mkl
  • blinker=1.4=py38h06a4308_0
  • brotlipy=0.7.0=py38h27cfd23_1003
  • c-ares=1.17.1=h27cfd23_0
  • ca-certificates=2021.4.13=h06a4308_1
  • cachetools=4.2.2=pyhd3eb1b0_0
  • certifi=2020.12.5=py38h06a4308_0
  • cffi=1.14.3=py38h261ae71_2
  • chardet=3.0.4=py38h06a4308_1003
  • click=8.0.0=pyhd3eb1b0_0
  • conda=4.10.1=py38h06a4308_1
  • conda-package-handling=1.7.2=py38h03888b9_0
  • coverage=5.5=py38h27cfd23_2
  • cryptography=3.2.1=py38h3c74f83_1
  • cudatoolkit=10.1.243=h6bb024c_0
  • cudnn=7.6.5=cuda10.1_0
  • cupti=10.1.168=0
  • cython=0.29.23=py38h2531618_0
  • gast=0.4.0=py_0
  • google-auth=1.28.0=pyhd3eb1b0_0
  • google-auth-oauthlib=0.4.4=pyhd3eb1b0_0
  • google-pasta=0.2.0=py_0
  • grpcio=1.36.1=py38h2157cd5_1
  • h5py=2.10.0=py38hd6299e0_1
  • hdf5=1.10.6=hb1b8bf9_0
  • idna=2.10=py_0
  • importlib-metadata=3.10.0=py38h06a4308_0
  • intel-openmp=2021.2.0=h06a4308_610
  • keras-preprocessing=1.1.2=pyhd3eb1b0_0
  • ld_impl_linux-64=2.33.1=h53a641e_7
  • libedit=3.1.20191231=h14c3975_1
  • libffi=3.3=he6710b0_2
  • libgcc-ng=9.1.0=hdf63c60_0
  • libgfortran-ng=7.3.0=hdf63c60_0
  • libprotobuf=3.14.0=h8c45485_0
  • libstdcxx-ng=9.1.0=hdf63c60_0
  • markdown=3.3.4=py38h06a4308_0
  • mkl=2021.2.0=h06a4308_296
  • mkl-service=2.3.0=py38h27cfd23_1
  • mkl_fft=1.3.0=py38h42c9631_2
  • mkl_random=1.2.1=py38ha9443f7_2
  • multidict=5.1.0=py38h27cfd23_2
  • ncurses=6.2=he6710b0_1
  • numpy=1.20.1=py38h93e21f0_0
  • numpy-base=1.20.1=py38h7d8b39e_0
  • oauthlib=3.1.0=py_0
  • openssl=1.1.1k=h27cfd23_0
  • opt_einsum=3.1.0=py_0
  • pip=20.2.4=py38h06a4308_0
  • protobuf=3.14.0=py38h2531618_1
  • pyasn1=0.4.8=py_0
  • pyasn1-modules=0.2.8=py_0
  • pycosat=0.6.3=py38h7b6447c_1
  • pycparser=2.20=py_2
  • pyjwt=1.7.1=py38_0
  • pyopenssl=19.1.0=pyhd3eb1b0_1
  • pysocks=1.7.1=py38h06a4308_0
  • python=3.8.5=h7579374_1
  • python-flatbuffers=1.12=pyhd3eb1b0_0
  • readline=8.0=h7b6447c_0
  • requests=2.24.0=py_0
  • requests-oauthlib=1.3.0=py_0
  • rsa=4.7.2=pyhd3eb1b0_1
  • ruamel_yaml=0.15.87=py38h7b6447c_1
  • scipy=1.6.2=py38had2a1c9_1
  • setuptools=50.3.1=py38h06a4308_1
  • six=1.15.0=py38h06a4308_0
  • sqlite=3.33.0=h62c20be_0
  • tensorboard=2.4.0=pyhc547734_0
  • tensorboard-plugin-wit=1.6.0=py_0
  • tensorflow=2.4.1=gpu_py38h8a7d6ce_0
  • tensorflow-base=2.4.1=gpu_py38h29c2da4_0
  • tensorflow-estimator=2.4.1=pyheb71bc4_0
  • tensorflow-gpu=2.4.1=h30adc30_0
  • termcolor=1.1.0=py38h06a4308_1
  • tk=8.6.10=hbc83047_0
  • tqdm=4.51.0=pyhd3eb1b0_0
  • typing-extensions=3.7.4.3=hd3eb1b0_0
  • typing_extensions=3.7.4.3=pyh06a4308_0
  • urllib3=1.25.11=py_0
  • werkzeug=1.0.1=pyhd3eb1b0_0
  • wheel=0.35.1=pyhd3eb1b0_0
  • wrapt=1.12.1=py38h7b6447c_1
  • xz=5.2.5=h7b6447c_0
  • yaml=0.2.5=h7b6447c_0
  • yarl=1.6.3=py38h27cfd23_0
  • zipp=3.4.1=pyhd3eb1b0_0
  • zlib=1.2.11=h7b6447c_3
    prefix: /root/miniconda3

Thanks for taking a look at this for me :slightly_smiling_face:

Is your original environment the same as the one in the base image used by repo2docker? If it’s not this could explain why some packages are incompatible.

You could try conda env export --no-builds and building from that instead?