I am trying to automate installation of miniconda and some packages thereafter within a singularity definition file to build an image. I am always getting the following error:
/.post.script: 10: conda: not found
FATAL: While performing build: while running engine: exit status 127
Assuming that one has to restart shell after installing conda, is there any way to automate this? The definition file is written below.
Bootstrap: docker
From: ubuntu:22.04
%post
apt-get update
apt-get -y install gfortran
apt-get -y install build-essential
apt-get -y install manpages-dev
apt-get -y install libgeos-dev
apt-get -y install wget
wget -c https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
/bin/bash Miniconda3-latest-Linux-x86_64.sh -bfp /opt
conda update conda
conda update python
conda install pip -y
pip install -y setuptools>=65.6
pip install -y cartopy==0.21.0
pip install -y contextily==1.2.0
pip install -y fiona==1.8.21
pip install -y pyproj==3.3.1
pip install -y rtree==1.0.1
pip install -y Shapely==1.8.2
pip install -y numpy==1.23.0
pip install -y pandas==1.4.3
pip install -y geopandas==0.11.0
pip install -y joblib==1.2.0
pip install -y matplotlib==3.6.2
pip install -y mercantile==1.2.1
pip install -y pytest==7.2.0
pip install -y python_dateutil==2.8.2
pip install -y pytz==2021.3
pip install -y timezonefinder==6.1.6
pip install -y pyarrow==10.0.0