-
Notifications
You must be signed in to change notification settings - Fork 36
Added a yml file to build the docker image #74
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
Changes from 2 commits
af49849
c2149da
863e7f7
1fa952c
7294bde
80c1663
602f17d
33acf99
dc9265d
7b2f0b8
ee2eb99
a4136f8
a6ddfb2
ea69e18
428095e
6fee6ed
1f6da96
17b98f8
12ae83f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Build and Run Docker | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, edited] | ||
branches: | ||
- main | ||
- "docker/**" | ||
|
||
jobs: | ||
build-and-run-docker: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Docker image | ||
Unique-Usman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: | | ||
docker build -t tf2.4_ivim-mri_codecollection -f Docker/Dockerfile . | ||
Unique-Usman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Save Docker image to a tarball | ||
run: | | ||
docker save -o tf2.4_ivim-mri_codecollection.tar tf2.4_ivim-mri_codecollection | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These things are large, how about also zipping it. |
||
|
||
- name: Upload Docker image artifact | ||
Unique-Usman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: docker-image | ||
path: tf2.4_ivim-mri_codecollection.tar | ||
|
||
- name: Run Docker container | ||
run: | | ||
docker run --rm --name TF2.4_IVIM-MRI_CodeCollection \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should confirm that images are actually generated. Maybe not the exact values in the images, but even that the files we expect exist. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, exactly. |
||
-v ${{ github.workspace }}:/usr/src/app \ | ||
-v ${{ github.workspace }}:/usr/app/output \ | ||
tf2.4_ivim-mri_codecollection brain.nii.gz brain.bvec brain.bval | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the data are available. We could pull it, but that run would take a while. Maybe we could read a small text file that does just a few fits and takes just a second or two. We really just want to run it to confirm it works, we have other tests to check the actual results. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How to go about the reading the small text file ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps even easier to simulate something. You can generate signals using |
||
|
||
- name: Clean up | ||
run: | | ||
docker rmi tf2.4_ivim-mri_codecollection | ||
rm tf2.4_ivim-mri_codecollection.tar |
Uh oh!
There was an error while loading. Please reload this page.