-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Before making a git-pull of C-PAC_GUI, please make sure that you've installed the following service/framework (newest version) on your local machine:
- A Unix system to build C-PAC_GUI
- Yarn
Run
git clone https://github.com/radiome-lab/C-PAC_GUI.git
git checkout feature/progress-tracking
to clone and checkout the dev branch.
cd C-PAC_GUI/
yarn
yarn run link
yarn run dev:browser
The last command will run C-PAC_GUI at localhost:1212
. You may apply this address in a browser (chrome/edge is recommended).
The last step is to configure the IndexedDB storage quota. In chrome/edge, use F12 to enter dev mode. select Application
-> storage
, check simulate custom storage quota
, and set to at least 2048 MB.
Another suggestion is to keep your computer awake during C-PAC is running.
As mentioned before, C-PAC tasks are running in clusters. We have 1 available AWS server that is running C-PAC.
Before connecting to the AWS cluster, please make sure that the administrator has added your public RSA key. Assume that your local private RSA key's location is ~/.ssh/id_rsa
.
ssh -NfL 2333:localhost:3333 -i ~/.ssh/id_rsa [email protected]
This command will bind the local port 2333
with the AWS port 3333
(the AWS C-PAC is running at 3333
). The connection has been established, and the C-PAC service can be accessed at localhost:2333
. You may find a more detailed explanation for -NfL
at here.
To log in to the AWS cluster, apply the following command:
ssh -i ~/.ssh/id_rsa [email protected]
The terminal will promote that one has logged into the cluster.
To restart C-PAC
sudo systemctl restart cpac-api.service
To check the current C-PAC SLURM jobs
squeue
To kill a SLURM job
scancel <id-from-squeue>
To check the real-time C-PAC logs
journalctl -u cpac-api.service -f
To update the code in the cluster from git
cd ~/cpac
git pull
git checkout feature/progress-tracking
For local debugging, another option is to run C-PAC locally (instead of on the AWS C-PAC cluster - it's slow!). Note that the local C-PAC is not running real-time C-PAC neuroimage preprocessing - it's actually mocking some crucial C-PAC real-time behaviors. However, you may still use your local C-PAC cluster to build your dataConfig
.
Please install the following services with the newest version on your local Unix system:
- Python3
- Docker
- Clone and checkout the dev branch
git pull https://github.com/radiome-lab/cpac.git
git checkout feature/progress-tracking
- First, enter the
cpac
folder
cd cpac
- Install Python3 dependencies
pip3 install -r requirements.txt
- Install the local docker images. The
dos2unix
command is needed ifsh tools/build-test-image.sh
reports a format bug.
(optional) dos2unix tools/build-test-image.sh
sh tools/build-test-image.sh
- Start the docker service
sudo service docker start
- Run C-PAC locally
cd src
python3 -m cpac.api -v scheduler --backend docker --docker-image fcpindi/c-pac:docker-test --address 0.0.0.0:3333
Now, C-PAC is running at localhost:3333
.