Skip to content

Commit

Permalink
Update slurm_cluster_info.json (#1889)
Browse files Browse the repository at this point in the history
* Update slurm_cluster_info.json

updated `worker_bin_path` to match install path

* Update 03-install_cryosparc.sh.j2

added section to connect worker nodes to the master
  • Loading branch information
themorey authored Mar 22, 2024
1 parent 570789a commit 8911d40
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "PARTITION",
"worker_bin_path": "/anfhome/apps/cryosparc_worker/bin/cryosparcw",
"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 }}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
#!/bin/bash
set -e

# Run only on CryoSPARC master node
[ $(hostname) != {{ applications.cryosparc.master_hostname }} ] && exit 0

export INSTALL_DIR=/anfhome/apps/cryosparc
SOURCES_DIR=${INSTALL_DIR}/sources

# connect worker nodes to the master
if [[ $(hostname) != {{ applications.cryosparc.master_hostname }} ]]; then
sudo chmod 777 /mnt
sudo su -c "$INSTALL_DIR/cryosparc_worker/bin/cryosparcw connect --worker $(hostname) \
--master {{ applications.cryosparc.master_hostname }} \
--port 39000 --ssdpath /mnt/" {{ applications.cryosparc.admin_user }}
fi

# Run only on CryoSPARC master node
[ $(hostname) != {{ applications.cryosparc.master_hostname }} ] && exit 0

###################################################
# Install CryoSPARC master locally on master node #
###################################################

# CryoSPARC master must be installed as admin user
sudo chown {{ applications.cryosparc.admin_user }} /cryosparc_data
sudo -i -u {{ applications.cryosparc.admin_user }} bash << EOF
cd /cryosparc_data
tar xzf ${SOURCES_DIR}/cryosparc_master.tar.gz
Expand Down Expand Up @@ -62,6 +71,5 @@ export CUDA_PATH
sudo -i -u {{ applications.cryosparc.admin_user }} bash << EOF
cd ${INSTALL_DIR}/cryosparc_worker
./install.sh --license {{ applications.cryosparc.license_id }} \
--cudapath ${CUDA_PATH} \
--yes
EOF

0 comments on commit 8911d40

Please sign in to comment.