Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switich to apptainer and miniforge - package versions #57

Open
christophista opened this issue Sep 20, 2024 · 0 comments
Open

switich to apptainer and miniforge - package versions #57

christophista opened this issue Sep 20, 2024 · 0 comments

Comments

@christophista
Copy link

  • Python version: 3.9
  • Operating System: Debian

Description

Trying to install docker file in an apptainer and also switch to miniforge

What I Did

Using apptainer (1.2.5 on Debian bookworm) I tried to underneath definition file to port NeuralPLexer to apptainer. Furthermore, I exchanged anaconda for miniforge to circumvent licensing issues. However, there seems to be a problem with numpy, pandas or mendeleev packages.

Thus, would anybody who has a working docker environment please share their conda environment with the exact package versions? I somehow suspect that newer version might cause this problem.

Thank you in advance

Bootstrap: docker
From: nvidia/cuda:11.7.1-devel-ubuntu22.04
Stage: spython-base


%arguments
  

%files

%post

  ## ###################################################################################################################
  echo -e "0. non-package related sw."
  apt-get update \
    && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
        make \
        git \
        wget \
        tzdata \
        awscli \
        tree \
        nano \
    && rm -rf /var/lib/apt/lists/* \
    && apt-get autoremove -y \
    && apt-get clean



  ## ###################################################################################################################
  echo -e "1. Installing Miniforge"
  wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
  bash Miniforge3-$(uname)-$(uname -m).sh -b
  PATH=/root/miniforge3/bin/:$PATH
  . "/root/miniforge3/etc/profile.d/conda.sh"
  cat /root/.bashrc
  conda activate /root/miniforge3


  
  ## ###################################################################################################################
  conda create -n NeuralPLexer python=3.9
  echo "conda activate NeuralPLexer" >> ~/.bashrc

  conda run -n NeuralPLexer pip install \
    pandas==2.0.0

  conda run -n NeuralPLexer pip install \
    torch==1.13.1+cu117 \
    torchvision==0.14.1+cu117 \
    torchaudio==0.13.1 \
    --extra-index-url https://download.pytorch.org/whl/cu117 --no-cache-dir

  conda run -n NeuralPLexer pip install \
    torch-scatter==2.1.0 \
    -f https://data.pyg.org/whl/torch-1.13.1+cu117.html --no-cache-dir

  conda run -n NeuralPLexer pip install \
    "git+https://github.com/facebookresearch/pytorch3d.git" \
    --force-reinstall --no-deps --no-cache-dir



  ## ###################################################################################################################
  git clone https://github.com/aqlaboratory/openfold.git
  cd openfold && \
    sed -i 's/std=c++14/std=c++17/g' setup.py && \
    conda run -n NeuralPLexer pip install . && \
    cd ../ && \
    rm -rf openfold


  
  ## ###################################################################################################################
  git clone https://github.com/zrqiao/NeuralPLexer.git && \
    cd NeuralPLexer && \
    conda run -n NeuralPLexer conda env update --file NeuralPLexer.yml && \
    conda run -n NeuralPLexer conda clean -afy && \
    conda run -n NeuralPLexer make install

  

  echo -e "\n\ncleanup\n"
  echo -e "\n\nall done...\n"


%environment


%runscript 
  echo "user command"
  echo "provided: '$@'"
  echo ""
  echo #######################################################################################################
  
  . "/root/miniforge3/etc/profile.d/conda.sh"
  conda activate NeuralPLexer
  exec $@


%startscript
  echo "start not supported"
  exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant