Bootstrap: docker
From: ubuntu:22.04

%files
	.condarc /root/.condarc
    4i24.pdb /root/4i24.pdb
    test.list /root/test.list
    _foldxLinux64.tar_.gz /root/_foldxLinux64.tar_.gz
    EvoEF2-master.zip /root/EvoEF2-master.zip
    install_scwrl4.0.2_64bit_2020_linux /root/install_scwrl4.0.2_64bit_2020_linux
    mutation.py /root/mutation.py
	pyrosetta-2023.31+release.1799523-py311_0.tar.bz2 /root/pyrosetta-2023.31+release.1799523-py311_0.tar.bz2
	noarch/repodata.json /root/repodata.json

%post
    cd /root && \
    apt-get update && \
	apt-get install tzdata -y && \
	ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
	apt-get install git zip wget bzip2 libgl1-mesa-glx g++ -y && \
	unzip EvoEF2-master.zip && \
	chmod +x EvoEF2-master/build.sh && \
	cd EvoEF2-master && \
	./build.sh && \
	cd .. && \
	tar zxvf _foldxLinux64.tar_.gz && \
	chmod +x install_scwrl4.0.2_64bit_2020_linux && \
	echo -e "Y\nLicense Holder Name" | ./install_scwrl4.0.2_64bit_2020_linux ./ && \
	wget -qO- https://micromamba.snakepit.net/api/micromamba/linux-64/latest | tar -xvj bin/micromamba && \
	./bin/micromamba shell init --shell bash --root-prefix=~/micromamba && \
	mkdir -p /root/noarch && \
	mv repodata.json /root/noarch && \
	mv pyrosetta-2023.31+release.1799523-py311_0.tar.bz2 /root/noarch && \
	./bin/micromamba create -n pyrosetta -c conda-forge -c default -c bioconda python=3.11 click loguru biopython pymol-open-source noarch/pyrosetta-2023.31+release.1799523-py311_0.tar.bz2 -y && \
	apt-get autoremove -y && \
	apt-get clean && \
	rm -rf /var/lib/apt/lists/* EvoEF2-master.zip install_scwrl4.0.2_64bit_2020_linux _foldxLinux64.tar_.gz noarch/*

%environment
    export author="lingyuzeng"
    export version="1.0.0"
    export PATH="/root/bin:/root/micromamba/bin:${PATH}"
    export CONDA_PREFIX="/root/micromamba/envs/pyrosetta"
	export DEBIAN_FRONTEND="noninteractive"
	export TZ="EAsia/Shanghai"

%runscript
    exec /root/micromamba/envs/pyrosetta/bin/python /root/mutation.py "$@"
