-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add support for CryoSPARC #1416
Open
vanzod
wants to merge
17
commits into
main
Choose a base branch
from
feature/cryosparc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8b36181
CryoSPARC installation and Slurm cluster config
vanzod ff7d040
Added cryosparc app entry in config.yml template
vanzod 690913b
Created NSG rule for cluster applications
vanzod 548ada8
Support multiple queues import in CryoSPARC
vanzod ef19445
Create apps directoy in shared home path
vanzod 3f2bc7c
Download CryoSPARC source archives in shared apps dir
vanzod 04d5088
Install CryoSPARC worker in shared volume from master
vanzod a221edb
Use CryoSPARC admin password from KV
vanzod c22fae3
Corrected typos
vanzod 6221ff1
Add CryoSPARC XFCE apps manu entry
vanzod 78b9b7d
Corrected typo
vanzod 8f22120
Removed hardcoded image value
vanzod 57e94ca
Resolved merge conflicts
vanzod 069abfd
Resolved merge conflict
vanzod 884d619
Sync with main branch
vanzod 570789a
Update azhop-slurm.txt.j2 (#1783)
themorey 8911d40
Update slurm_cluster_info.json (#1889)
themorey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
playbooks/roles/cyclecloud_cluster/projects/cryosparc/cluster-init/files/cryosparc.desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[Desktop Entry] | ||
Type=Link | ||
Version=1.0 | ||
Name=CryoSPARC | ||
Icon=/usr/share/icons/hicolor/16x16/apps/cryosparc.png | ||
URL=http://cryosparc-master:39000/ | ||
Name[en_US.UTF-8]=CryoSPARC | ||
Categories=Education |
Binary file added
BIN
+5.54 KB
...roles/cyclecloud_cluster/projects/cryosparc/cluster-init/files/cryosparc_16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions
11
...ks/roles/cyclecloud_cluster/projects/cryosparc/cluster-init/files/slurm_cluster_info.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "PARTITION", | ||
"worker_bin_path": "/anfhome/apps/cryosparc/cryosparc_worker/bin/cryosparcw", | ||
"cache_path": "/mnt/resource", | ||
"send_cmd_tpl": "{{ command }}", | ||
"qsub_cmd_tpl": "sbatch {{ script_path_abs }}", | ||
"qstat_cmd_tpl": "squeue -j {{ cluster_job_id }}", | ||
"qdel_cmd_tpl": "scancel {{ cluster_job_id }}", | ||
"qinfo_cmd_tpl": "sinfo", | ||
"transfer_cmd_tpl": "scp {{ src_path }} loginnode:{{ dest_path }}" | ||
} |
13 changes: 13 additions & 0 deletions
13
...ks/roles/cyclecloud_cluster/projects/cryosparc/cluster-init/files/slurm_cluster_script.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
#SBATCH --partition=PARTITION | ||
#SBATCH --nodes=1 | ||
#SBATCH --ntasks-per-node={{ num_cpu }} | ||
#SBATCH --cpus-per-task=1 | ||
#SBATCH --threads-per-core=1 | ||
#SBATCH --gres=gpu:{{ num_gpu }} | ||
#SBATCH --mem={{ (ram_gb*1000)|int }}MB | ||
#SBATCH --job-name cryosparc_{{ project_uid }}_{{ job_uid }} | ||
#SBATCH --output={{ job_log_path_abs }} | ||
#SBATCH --error={{ job_log_path_abs }} | ||
|
||
{{ run_cmd }} |
14 changes: 14 additions & 0 deletions
14
...roles/cyclecloud_cluster/projects/cryosparc/cluster-init/scripts/01-setup_data_disk.sh.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Run only on CryoSPARC master node | ||
[ $(hostname) != {{ applications.cryosparc.master_hostname }} ] && exit 0 | ||
|
||
parted /dev/sdb mktable gpt | ||
parted /dev/sdb mkpart primary ext4 0% 100% | ||
mkfs.ext4 /dev/sdb1 | ||
DEV_UUID=$(blkid -s UUID -o value /dev/sdb1) | ||
printf 'UUID=%s /cryosparc_data ext4 defaults 0 0\n' $DEV_UUID >> /etc/fstab | ||
mkdir /cryosparc_data | ||
mount -a | ||
chown {{ applications.cryosparc.admin_user }}: /cryosparc_data |
22 changes: 22 additions & 0 deletions
22
...es/cyclecloud_cluster/projects/cryosparc/cluster-init/scripts/02-download_cryosparc.sh.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Run only on CryoSPARC master node | ||
[ $(hostname) != {{ applications.cryosparc.master_hostname }} ] && exit 0 | ||
|
||
INSTALL_DIR=/anfhome/apps/cryosparc | ||
SOURCES_DIR=${INSTALL_DIR}/sources | ||
|
||
mkdir -p ${SOURCES_DIR} | ||
cd ${SOURCES_DIR} | ||
|
||
for COMPONENT in master worker; do | ||
if [ -s ${SOURCES_DIR}/cryosparc_${COMPONENT}.tar.gz ]; then | ||
echo "cryosparc_${COMPONENT}.tar.gz already downloaded" | ||
else | ||
echo "Downloading cryosparc_${COMPONENT}.tar.gz" | ||
curl -L https://get.cryosparc.com/download/${COMPONENT}-latest/{{ applications.cryosparc.license_id }} -o cryosparc_${COMPONENT}.tar.gz | ||
fi | ||
done | ||
|
||
chown -R {{ applications.cryosparc.admin_user }}: ${INSTALL_DIR} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to make this generic.