trying to build docker with dockerfile: # Use base CUDA image
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04

Update NVIDIA GPG key
RUN rm -f /etc/apt/sources.list.d/cuda.list &&
apt-get update &&
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends wget &&
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb &&
dpkg -i cuda-keyring_1.0-1_all.deb

Preseed tzdata and install dependencies
RUN truncate -s0 /tmp/preseed.cfg &&
echo "tzdata tzdata/Areas select Europe" >> /tmp/preseed.cfg &&
echo "tzdata tzdata/Zones/Europe select Berlin" >> /tmp/preseed.cfg &&
debconf-set-selections /tmp/preseed.cfg &&
rm -f /etc/timezone /etc/localtime &&
apt-get update &&
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata sudo nano git ffmpeg libsm6 libxext6 &&
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Install Miniconda
ENV CONDA_DIR=/opt/conda
ENV PATH="$CONDA_DIR/bin:$PATH"

RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh &&
/bin/bash ~/miniconda.sh -b -p $CONDA_DIR &&
rm ~/miniconda.sh &&
$CONDA_DIR/bin/conda clean -afy &&
ln -s $CONDA_DIR/etc/profile.d/conda.sh /etc/profile.d/conda.sh &&
echo ". $CONDA_DIR/etc/profile.d/conda.sh" >> ~/.bashrc

Update conda, set channel priority to strict, and install mamba
RUN conda update -n base -c defaults conda -y &&
conda config --set channel_priority flexible &&
conda install -n base -c conda-forge mamba -y

Copy your conda environment file
COPY conda_env.yml /tmp/conda_env.yml

Create Conda environment with mamba
RUN mamba env create -f /tmp/conda_env.yml -p /opt/conda/envs/kpinst &&
conda clean -afy &&
conda env list

Set environment variables to use the new environment
ENV CONDA_DEFAULT_ENV=kpinst
ENV PATH="$CONDA_DIR/envs/kpinst/bin:$PATH"

Initialize conda
RUN conda init bash
RUN conda run -p /opt/conda/envs/kpinst pip install openmim &&
conda run -p /opt/conda/envs/kpinst mim install mmcv-full==1.7.1

Verify that mim is installed
RUN ls /opt/conda/envs/kpinst/bin/

Activate the environment
ENV PATH /opt/conda/envs/kpinst/bin:$PATH

Set PYTHONPATH to include the 'iSUOR_toolbox' directory
ENV PYTHONPATH="/workspace/isuor_kpinst/kpinst:${PYTHONPATH}"

Install MMDetection from source
RUN git clone https://github.com/open-mmlab/mmdetection.git /mmdet &&
cd /mmdet &&
git checkout 94afcdc &&
pip install -v -e .

Install Monocular-Depth-Estimation-Toolbox from source
RUN git clone https://github.com/zhyever/Monocular-Depth-Estimation-Toolbox.git /mde_toolbox &&
cd /mde_toolbox &&
git checkout 7c0c89c &&
pip install -v -e .

Update PYTHONPATH and activate the environment in .bashrc for interactive sessions
RUN echo "export PYTHONPATH=/workspace/isuor_kpinst/kpinst/:${PYTHONPATH}" >> ~/.bashrc &&
echo "conda activate kpinst" >> ~/.bashrc

Verify that 
init
.py exists
RUN ls -la /mde_toolbox/depth/

Adjust MMCV_MAX version in MDE-Toolbox to prevent version complaints
RUN sed -i "s/MMCV_MAX = '1.5.0'/MMCV_MAX = '1.8.0'/g" /mde_toolbox/depth/init.py

Install yapf to fix configuration printing bug
RUN pip install yapf==0.40.1

Replace memory hook in MMCV to fix GPU context issue
COPY patch/hooks_memory.py $CONDA_DIR/envs/kpinst/lib/python3.9/site-packages/mmcv/runner/hooks/memory.py and conda_env.yml: name: kpinst
channels:
  - defaults
  - pytorch
  - nvidia
  - conda-forge
dependencies:
  - python=3.9
  - pip
  - pytorch==2.0.0
  - torchvision==0.15.0
  - torchaudio==2.0.0
  - pytorch-cuda=11.8
  - yacs
  - iopath
  - tensorboard
  - numpy>=1.20
  - pillow
  - matplotlib
  - wandb
  - seaborn
  - tqdm
  - opencv==4.5.5
  - pytest-shutil
  - scikit-image
  - pycocotools
  - faiss-gpu
  - kornia
  - terminaltables
  - pybind11
  - pip:
    - openmim==0.3.9
    - git+
https://github.com/waspinator/coco.git@2.1.0

    - pycls
    - inplace-abn
    - xtcocotools
    - json_tricks
    - Pillow
    - inplace-abn
    - git+
https://github.com/robot-learning-freiburg/amodal-panoptic

    - git+
https://github.com/waspinator/pycococreator.git
 and i get the followign error:
714.8           self.build_extensions()
714.8         File "/opt/conda/envs/kpinst/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 485, in build_extensions
714.8           compiler_name, compiler_version = self._check_abi()
714.8         File "/opt/conda/envs/kpinst/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 869, in _check_abi
714.8           _, version = get_compiler_abi_compatibility_and_version(compiler)
714.8         File "/opt/conda/envs/kpinst/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 337, in get_compiler_abi_compatibility_and_version
714.8           if not check_compiler_ok_for_platform(compiler):
714.8         File "/opt/conda/envs/kpinst/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 291, in check_compiler_ok_for_platform
714.8           which = subprocess.check_output(['which', compiler], stderr=subprocess.STDOUT)
714.8         File "/opt/conda/envs/kpinst/lib/python3.9/subprocess.py", line 424, in check_output
714.8           return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
714.8         File "/opt/conda/envs/kpinst/lib/python3.9/subprocess.py", line 528, in run
714.8           raise CalledProcessError(retcode, process.args,
714.8       subprocess.CalledProcessError: Command '['which', 'g++']' returned non-zero exit status 1.
714.8       [end of output]
714.8
714.8   note: This error originates from a subprocess, and is likely not a problem with pip.
714.8   ERROR: Failed building wheel for inplace-abn
714.8 ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pycocotools, inplace-abn)
714.8
714.8
714.8 failed
714.8
714.8 CondaEnvException: Pip failed
714.8
Dockerfile:41
  40 |     # Create Conda environment with mamba
  41 | >>> RUN mamba env create -f /tmp/conda_env.yml -p /opt/conda/envs/kpinst && 
  42 | >>>     conda clean -afy && 
  43 | >>>     conda env list
  44 |
ERROR: failed to solve: process "/bin/sh -c mamba env create -f /tmp/conda_env.yml -p /opt/conda/envs/kpinst && conda clean -afy && conda env list" did not complete successfully: exit code: 1