Comments (3)
@komatsuna-san: we'd also like to containerize relion via apptainer - would you be willing to share your def file if you already have it running? Would be highly appreciated.
Cheers,
xen
from relion.
My current environment is shown below. Note that I have not been able to test all features.
OS: AlmaLinux 8 (on WSL2)
Apptainer: ver. 1.2.3-1.el8
NVIDIA Driver: ver. 531.41
NVIDIA Container Toolkit: ver. 1.13.5
My apptainer container recipe relion-v5.0b.def
is as follows.
BootStrap: docker
From: nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
%post
### Set up Ubuntu ###
# for localtime WARNING
touch /etc/localtime
# Install RELION dependent packages
apt update && apt upgrade -y
apt install -y \
build-essential gcc-9 g++-9 cmake git curl mpi-default-bin mpi-default-dev \
libtiff-dev libpng-dev ghostscript libxft-dev libgl1-mesa-dev
# Add en_US.UTF-8 to locale
apt install -y locales
locale-gen en_US.UTF-8
# Clean up apt
rm -rf /var/lib/apt/lists/* && apt autoremove -y && apt clean
# Default to gcc-9 and g++-9
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 99
gcc --version
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 99
g++ --version
### Install CTFFIND-4.1.14 ###
# Prepare the installation directory
mkdir -p /usr/local/apps/ctffind-4.1.14
cd /usr/local/apps/ctffind-4.1.14
# Download CTFFIND
DL_URL='https://grigoriefflab.umassmed.edu/system/tdf?path=ctffind-4.1.14-linux64.tar.gz&file=1&type=node&id=26'
curl -L ${DL_URL} -o ./ctffind-4.1.14-linux64.tar.gz
# Extract and then remove the downloaded .tar.gz file
tar -xvf ./ctffind-4.1.14-linux64.tar.gz
rm -f ./ctffind-4.1.14-linux64.tar.gz
### Install python libraries for RELION ###
### Blush, DynaMight, Model-Angelo, Classranker, Topaz, etc.) ###
# Install Pyenv to /usr/local/apps
git clone https://github.com/yyuu/pyenv.git /usr/local/apps/pyenv
export PYENV_ROOT="/usr/local/apps/pyenv"
export PATH="${PYENV_ROOT}/bin:${PATH}"
# Install Miniforge through Pyenv
pyenv install --list
pyenv install miniforge3-22.9.0-3
pyenv global miniforge3-22.9.0-3
pyenv versions
# Activate the environment of installed Miniforge
export MINIFORGE3_ROOT="${PYENV_ROOT}/versions/miniforge3-22.9.0-3"
export PATH="${MINIFORGE3_ROOT}/bin:${PATH}"
# Update conda
conda update -n base conda
# Clone RELION (ver. 5.0-beta) repository to /usr/local/apps/relion-git
git clone https://github.com/3dem/relion.git -b ver5.0 /usr/local/apps/relion-git
cd /usr/local/apps/relion-git
# Modify the environment.yml to use only conda-forge
sed -i.bak -e 's|name: relion-5.0|name: relion-conda|g' ./environment.yml
sed '/- defaults/d' ./environment.yml
# Create a conda environment for RELION (relion-conda)
conda env create -f ./environment.yml
# Clean up conda
conda clean --all --force-pkgs-dirs --yes
# Activate the relion-conda
export RELION_CONDA="${MINIFORGE3_ROOT}/envs/relion-conda"
export PATH="${RELION_CONDA}/bin:${PATH}"
export LD_LIBRARY_PATH="${RELION_CONDA}/lib:${LD_LIBRARY_PATH}"
# Check the list of installed libraries
conda list -n relion-conda
### Install RELION (ver. 5.0-beta) ###
# Prepare directories for RELION build
mkdir -p /usr/local/apps/relion-git/build
mkdir -p /usr/local/apps/torch/home
export TORCH_HOME="/usr/local/apps/torch/home"
cd /usr/local/apps/relion-git/build
# Install RELION to /usr/local/apps/relion-v5.0-beta
# Add -DAMDFFTW=ON to the following (if AMD CPU)
cmake \
-DCMAKE_INSTALL_PREFIX="/usr/local/apps/relion-v5.0-beta" \
-DFORCE_OWN_FFTW=ON -DFORCE_OWN_FLTK=ON \
-DPYTHON_EXE_PATH="${RELION_CONDA}/bin/python" \
-DTORCH_HOME_PATH="${TORCH_HOME}" \
..
make -j8 && make install
%environment
# For OpenMPI
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/openmpi/lib:${LD_LIBRARY_PATH}"
# For RELION
export RELION_HOME="/usr/local/apps/relion-v5.0-beta"
export PATH="${RELION_HOME}/bin:${PATH}"
export LD_LIBRARY_PATH="${RELION_HOME}/lib:${LD_LIBRARY_PATH}"
# For Blush, DynaMight, Model-Angelo, Classranker, Topaz, etc.
export MINIFORGE3_ROOT="/usr/local/apps/pyenv/versions/miniforge3-22.9.0-3"
export RELION_CONDA="${MINIFORGE3_ROOT}/envs/relion-conda"
export PATH="${RELION_CONDA}/bin:${PATH}"
export TORCH_HOME="/usr/local/apps/torch/home"
# Default CTFFIND-4.1+ executable
export RELION_CTFFIND_EXECUTABLE="/usr/local/apps/ctffind-4.1.14/bin/ctffind"
# The default scratch directory in the GUI
# (depends on your environment outside this container)
export RELION_SCRATCH_DIR="/scratch"
%runscript
"$@"
For example, build the RELION container as follows.
apptainer build ./relion-v5.0b.sif ./relion-v5.0b.def
Start RELION as follows.
Suppose the relion-v5.0b.sif
is placed at ${APPTAINER_IMAGE}
.
apptainer run --nvccli --bind /scratch:/scratch ${APPTAINER_IMAGE}/relion-v5.0b.sif relion
--nvccli
needs nvidia-container-toolkit
.
--bind /scratch:/scratch
depends on your system.
Regards,
from relion.
Thanks a lot, highly appreciated!
from relion.
Related Issues (20)
- Identical rlnImageName assigned to different subtomograms after joining star files and re-extracting HOT 1
- Initial model GUI incorrectly applies C1 symmetry when C10,C11...C19 symmetry is requested in "Run in C1 and apply symmetry later" HOT 1
- Download model HOT 10
- motioncor2 only works properly up to a version 1.5.0 in relion-5.0b (commit 70875e) HOT 1
- RELION behaves like there is GPU sharing in Refine3D jobs when used on a slurm cluster causing VRAM errors HOT 8
- ERROR: CudaCustomAllocator out of memory in SPA using Relion 5.0-beta-0-commit-90d239 HOT 1
- Error when building relion with many recent commits that changed CMakeLists HOT 3
- Segmentation fault in 3D classification in relion HOT 5
- tomo name error if the name starts with a 0 in TS alignment Relion5 HOT 7
- failed to create cufft plan HOT 3
- No option to correct CTF during ReconstructTomograms in Relion5 GUI HOT 8
- Relion5 build : Could NOT find Torch home directory for Conda env HOT 1
- Issue with CTF estimation, RELION tries to convert particles even though they are in the right format HOT 1
- Crash with relion and GPU HOT 2
- Multibody refinement initial offset search parameters are multiplied by an extra factor of pixel size
- stack numbering not updated in relion_image_handler
- Relion5.0 tomo HOT 7
- CTFFIND5 support HOT 6
- Gain ref different size than tifs HOT 3
- Cannot SIZE object 50 because it does not exist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from relion.