Skip to content

Running Protein Folding Tools on EC2 Instance

0

Hi,

I'm looking to run AlphaFold on my g6e EC2 instance but after downloading all libraries and dependencies, CUDA cannot be initialised and I'm always falling back to CPU instead of using the GPU for prediction runs. I'm using the Deep Learning PyTorch AMI, shouldn't it work?

asked 2 months ago57 views
1 Answer
0

Yes, the AWS Deep Learning PyTorch AMI should support running AlphaFold with GPU acceleration on your g6e instance, but there might be a few issues preventing CUDA from initializing properly.

The Deep Learning OSS AMI GPU PyTorch comes pre-configured with NVIDIA drivers, CUDA toolkit, and other necessary components for GPU computing. For g6e instances, the AMI includes NVIDIA Driver and CUDA 12.8 stack with installation directories at /usr/local/cuda-12.8/.

Here are some steps to troubleshoot your issue:

  1. Verify your GPU is detected by running nvidia-smi in your terminal. This should display information about your GPU.

  2. Check if your CUDA environment variables are properly set:

export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
  1. Ensure your Python environment has CUDA-compatible libraries. If you're using JAX with AlphaFold, you might need to install the CUDA-compatible version:
pip install -U "jax[cuda12]"

(Replace cuda12 with your specific CUDA version)

  1. Verify that the CUDA versions in nvcc --version and nvidia-smi match.

For running protein folding specifically, you might want to consider the Quantori solution on AWS, which provides a user interface for running protein folding analyses with AlphaFold2. This solution allows you to select the ML algorithm, EC2 instance type, and database configuration through a simple interface.
Sources
Run protein folding on AWS with Quantori | AWS HPC Blog
No CUDA available on EC2 instance g5.xlarge | AWS re:Post
Resolve NVIDIA GPU and GPU driver issues in Amazon EC2 | AWS re:Post
AWS Deep Learning OSS AMI GPU PyTorch 2.7 (Amazon Linux 2023) - AWS Deep Learning AMIs

answered 2 months ago
AWS
SUPPORT ENGINEER
reviewed 2 months ago