After completing the hardware setup in the previous post, it’s time to configure the operating system and software environment.
This post documents the actual process of installing CryoSPARC and RELION on Ubuntu, building a single-GPU workstation suitable for SPA training and small-scale data processing.


1. Installing Ubuntu and Basic Setup

I used Ubuntu 24.04 LTS.
During installation, I selected “Minimal Installation” to avoid unnecessary GUI packages, then performed a basic system update.

sudo apt update && sudo apt upgrade -y

To enable remote access, install the SSH server:

sudo apt install openssh-server

You can connect from another computer using:

ssh -Y id@domain.com

Using a dynamic DNS service such as DuckDNS allows stable access even from external networks.


2. NVIDIA Driver and CUDA Environment

GPU acceleration is essential for Cryo-EM data processing. In Ubuntu, install the NVIDIA driver as follows:

sudo apt install nvidia-driver-535
sudo reboot
nvidia-smi

Once the GPU is properly recognized, install the CUDA toolkit. Both CryoSPARC and RELION work stably with CUDA 12.x.

sudo apt install nvidia-cuda-toolkit
nvcc --version

If the CUDA version changes during system updates, either software may fail to start. For long-term stability, it’s best to pin or lock the CUDA version.


3. Installing CryoSPARC

CryoSPARC runs as an independent Python-based server application. On a single workstation, both the master and worker processes can run on the same machine.

wget https://get.cryosparc.com/download/master-latest.tar.gz
tar -xzf cryosparc_master.tar.gz
./install.sh

During installation, specify the admin email, port (default: 39000), and data directory. After installation, start the CryoSPARC service via CLI:

cryosparcm start
cryosparcm status

Access the web interface at http://localhost:39000. If command auto-completion (tab) doesn’t work properly in Linux, add the CryoSPARC path to .bashrc and reload it.


4. Installing RELION

RELION is built from source using GitHub. Install the required dependencies first:

sudo apt install build-essential cmake openmpi-bin libfftw3-dev
git clone https://github.com/3dem/relion.git
cd relion && mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/relion
make -j 8 && sudo make install

Then add the executable path:

echo 'export PATH=/opt/relion/bin:$PATH' >> ~/.bashrc

This workstation uses a single GPU, so MPI-based parallel execution was not configured. If additional GPUs are added later, parallel processing can be enabled using mpirun.


5. Running CryoSPARC and RELION Together

Installing and running CryoSPARC and RELION on the same system is possible. However, when both programs attempt to access the GPU simultaneously, an error may occur. It is therefore best to run them sequentially or assign separate GPUs if available.

This setup assumes a single-GPU personal workstation designed primarily for SPA practice and learning purposes.

Data storage is handled through a mounted external SSD, which CryoSPARC can partially use as a cache, improving data access speed.

More detailed workflows for both CryoSPARC and RELION will be covered in a future post.


6. Maintenance and Updates

Regular updates are performed with the following commands:

sudo apt update && sudo apt upgrade
cryosparcm update

Whenever you update drivers or CUDA, always verify GPU status using nvidia-smi and test that CryoSPARC and RELION still run correctly.


Building the workstation myself gave me a much clearer understanding of how computational power, memory, and storage interact to affect real-world performance. Even with a single GPU, it’s fully possible to complete SPA training and data processing workflows. The more you understand your environment, the faster and more confidently you can troubleshoot and optimize it.

In the next post, I’ll go over RELION configuration and running tutorial datasets — the stage where actual EM data processing begins.