-
Notifications
You must be signed in to change notification settings - Fork 13
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
[ENH] Better devops and cleanup #95
Conversation
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.
Looks great !
handler/Dockerfile
Outdated
RUN tar -xzf /ROBEXv12.linux64.tar.gz | ||
RUN mkdir /ROBEX && \ | ||
curl -SL 'https://www.nitrc.org/frs/download.php/5994/ROBEXv12.linux64.tar.gz//?i_agree=1&download_now=1' | \ | ||
tar -xvzC /ROBEX |
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.
@anibalsolon, this is causing an error when trying to use quickshear for anatomical defacing.
failed to run deface -- code:1
+ defaced=./quick_nifti_test/time-20200122142947-sn-2-name-anat-T1w.nii.gz.defaced.nii.gz
+ echo '--------------- defacing(quickshear) [0] ./quick_nifti_test/time-20200122142947-sn-2-name-anat-T1w.nii.gz to ./quick_nifti_test/time-20200122142947-sn-2-name-anat-T1w.nii.gz.defaced.nii.gz ----------------'
+ case $method in
+ runROBEX.sh ./quick_nifti_test/time-20200122142947-sn-2-name-anat-T1w.nii.gz ./quick_nifti_test/time-20200122142947-sn-2-name-anat-T1w.nii.gz.mask.nii.gz
environment: line 10: runROBEX.sh: command not found
real 0m0.000s
user 0m0.000s
sys 0m0.000s
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.
Thank you for testing, @dlevitas ! It should be pointing now to the correct file.
@anibalsolon handler/bids.sh currently imports |
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.
Some changes need to be addressed as currently:
(1) (IMPORTANT) the finalize step is broken
- convert.js
was changed to convert.ts
. bids.sh
still imports convert.js
- handler/package.json
needs to include async in its dependencies
(2) (IMPORTANT) the swagger stuff is broken
(3) (minor) stylistic improvements and consistency with dev files
Addressing my comments should solve these issues
|
||
//import sendSeekable = require('send-seekable'); | ||
import * as models from "./models"; | ||
import controllers from "./controllers"; |
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.
if we import controllers like this, then we should export it as default in the controllers.ts file. Instead of module.exports = router
it should be export default router
"author": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"dotenv": "^16.3.1", |
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.
include async
in dependencies as required by convert.ts
api/package.json
Outdated
"deploy": "ssh -t [email protected] \"sudo su - -c 'cd /root/docker/ezbids && ./update.sh'\"", | ||
"deploy-prod": "ssh -t -J [email protected] ubuntu@ezbids \"sudo su - -c 'cd /root/docker/ezbids && ./update.sh'\"" | ||
"dev": "ts-node-dev --respawn --transpile-only ezbids.ts", | ||
"prod": "tsc && node ./build/ezbids.js" |
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.
are files transpiled into JS when built? Just double checking that the prod script here was intentional and shouldn't instead be: "prod": "tsc && node ./build/ezbids.ts"
handler/package.json
Outdated
"description": "", | ||
"scripts": { | ||
"dev": "ts-node-dev --respawn --transpile-only handler.ts", | ||
"prod": "tsc && node ./build/handler.js" |
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.
are files transpiled into JS when built? Just double checking that the prod script here was intentional and shouldn't instead be: "prod": "tsc && node ./build/handler.ts"
Swagger ts support
… into enh/better-devops
This PR attempts to address some issues with the current repo organization and development flow:
sudo
to do something, it's straight wrong. Now, it uses host user ID to run docker, and the data has the correct permissionsyou can stop and rebuild the images using:
./dev.sh stop
and./dev.sh build