Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions docker/reditools2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@ RUN conda env create -n myenv --file env_reditools2.yml \
&& conda clean --all -f -y \
&& echo "conda activate myenv" >> ~/.bashrc # Auto-activating Conda setup for Python 2.7


# Get and install tools
RUN git clone --depth=1 https://github.com/BioinfoUNIBA/REDItools2.git reditools2
RUN chmod +x reditools2/src/cineca/reditools.py
RUN ln -n reditools2/src/cineca/reditools.py /usr/bin/reditools.py
RUN ln -n reditools2/src/cineca/parallel_reditools.py /usr/bin/parallel_reditools.py

# Set up Docker entrypoint for auto-activation of conda env
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
ENTRYPOINT ["/bin/bash", "-c", "source /opt/conda/etc/profile.d/conda.sh && conda activate myenv && exec \"$@\"", "--"]

CMD ["bash"]
4 changes: 0 additions & 4 deletions docker/reditools2/entrypoint.sh

This file was deleted.

11 changes: 3 additions & 8 deletions singularity/reditools2/reditools2.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ From: condaforge/miniforge3:24.7.1-2

%files
singularity/reditools2/env_reditools2.yml ./env_reditools2.yml
singularity/reditools2/entrypoint.sh /usr/local/bin/entrypoint.sh

%post
# Activer conda dans l'environnement shell
Expand All @@ -12,7 +11,8 @@ From: condaforge/miniforge3:24.7.1-2

# Créer l'environnement Conda
conda create -n myenv python=2.7 -y
echo "conda activate myenv" >> /environment
echo "conda init" >> /root/.bashrc
echo "conda activate myenv" >> /root/.bashrc

# Mettre à jour avec le fichier YAML
conda env update -n myenv --file env_reditools2.yml
Expand All @@ -26,18 +26,13 @@ From: condaforge/miniforge3:24.7.1-2
ln -s /opt/reditools2/src/cineca/reditools.py /usr/local/bin/reditools.py
ln -s /opt/reditools2/src/cineca/parallel_reditools.py /usr/local/bin/parallel_reditools.py

# Entrypoint
chmod +x /usr/local/bin/entrypoint.sh

%environment
export PATH=/usr/local/bin:$PATH
export CONDA_DEFAULT_ENV=myenv
export PATH=/opt/conda/envs/myenv/bin:$PATH
source /opt/conda/etc/profile.d/conda.sh
conda activate myenv

%runscript
exec /usr/local/bin/entrypoint.sh "$@"
exec /bin/bash

%labels
Author jacques.dainat@ird.fr
Expand Down