Given cryoSPARC's licensing system, we are unable to distribute pre-installed software environments with cryoSPARC. Instead, users just need to follow a few easy setup steps with their personal license, and then you can use the software on AWS.

NOTE: The following assumes that you have already installed cryoem-cloud-tools.

Using cryoSPARC on AWS

After you have set up cryoSPARC (see below), you can use it in the following way on a day-to-day basis

Launch single GPU AWS instance with cryoSPARC volume

Launch AWS GPU instance p2.xlarge (1x K80 GPU) using EBS volume previously created with cryoSPARC installation:

$ awslaunch --instance=p2.xlarge --availZone=us-west-2a --volume=vol-0000000 --cryosparc

  • IMPORTANT: You must specify --cryosparc so that the code knows how to set up the instance for you
  • Where vol-000000 was created below during cryoSPARC installation on AWS
  • us-west-2a is the availability zone, can be changed depending on where you are running your jobs

Once launched, you will see the following text printed to the terminal:

To access cryoSPARC, type the following into the web browser used to launch instance:

ec2-34-215-145-128.us-west-2.compute.amazonaws.com:38000/

Copy files to instance

Copy your data to AWS:

$ scp -i /path/to/keypair.pem /path/to/file*.mrcs ubuntu@00.000.000:/data/

  • If RELION .star/mrcs files, make sure to include both types of files (.star & .mrcs)

Import through cryoSPARC website

To access cryoSPARC, navigate your web browser to the address printed after launch.

Which means that you need to copy and paste the URL printed to your terminal into your web browser. Note that this will setup access ONLY from the IP address from where you launched the instance.

Once everything is running, you can import your data by finding it within the directory:

/data/

Use cryoSPARC

Use cryoSPARC as they have described on their website.

Download output results (optional)

Make sure to download your results as they are generated.

Turn off instance

When finished for the morning/afternoon/evening, simply terminate the instance using the instance ID provided by the awsls command:

$ awskill i-00000000

  • Don't worry, your data will be saved on the EBS volume. You can pick right back up where you left off by restarting the instance using the same EBS volume.

 


cryoSPARC installation on AWS

1. Get cryoSPARC license

We cannot distribute cryoSPARC pre-installed on AWS, which means users need to first obtain the license file from cryoSPARC.

2. Install cryoSPARC on EBS volume 

Using cryoem-cloud-tools, boot up a single GPU machine (p2.xlarge) with Ubuntu and other software pre-installed.

First, create an EBS volume that will be your cryoSPARC data storage repository and software installation directory:

$ aws_ebs_create 100 us-west-2a "cryoSPARC"

Then, using this EBS volume when launching the p2.xlarge instance:

$ awslaunch --instance=p2.xlarge --availZone=us-west-2a --volume=vol-0000000

  • Note that I specified my availability zone us-west-2a. This will depend on which region & availability zone that you are using

You will be able to see the instance that you just booted up by typing the following to list just instances:

$ awsls -i

ssh into this instance:

$ ssh -X -i /path/to/keypair.pem ubuntu@00.00.000

Install cryoSPARC using the link that they send you:

$ bash -c "$(curl -sSL https://cryosparc.download/?license=xxxxxx-xxxx-xxx-xxx-xxxxxxxx)"

Then, for the first question, specify the following. This is important as the code will assume this installation location:

Continue installation at
/home/ubuntu/cryosparc
1) Yes
2) Change
#? 2
Enter new install directory:/data/cryosparc_install/
Continue installation at
/data/cryosparc_install/
1) Yes
2) Change
#? 1

Then, for the next question:

******* CRYOSPARC INSTALLER **************************************

Installation Settings:
Root Directory : /data/cryosparc_install
HTTP Port Number : 38000
MongoDB Port Number: 38001
Install Type : master
Developer Install : false
Operating System : Linux
Insecure Install : false
Deploy Version : v0.6.1

******************************************************************

...

Are the above settings correct?
1) Yes
2) No
#? 1

[It will then install a number of software packages automatically]

Next, specify a location for output data:

******* CRYOSPARC INSTALLATION COMPLETE **************************

Initial cryoSPARC configuration will now commence.

--------------------- Output Location -----------------------------

...

Enter path (tab-completion is enabled)
: /data/

Press [enter] a few times to confirm default options.

Then, specify the scratch location. For p2 instances, you will use EBS volumes as the scratch SSD drive:

--------------------- SSD Caching ----------------------------------

...

Enter path (tab-completion is enabled)
: /data/