Skip to content
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

Recommended development process for building docker images? #1796

Closed
emdupre opened this issue Sep 27, 2019 · 3 comments
Closed

Recommended development process for building docker images? #1796

emdupre opened this issue Sep 27, 2019 · 3 comments

Comments

@emdupre
Copy link
Collaborator

emdupre commented Sep 27, 2019

In investigating #1786, @Shotgunosine and I tried to build new Docker images of fMRIprep as recommended in the development guidelines. Unfortunately, running the built images fails with the error:

Traceback (most recent call last):
  File "/usr/local/miniconda/bin/fmriprep", line 10, in <module>
    sys.exit(main())
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py", line 311, in main
    opts = get_parser().parse_args()
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py", line 49, in get_parser
    currentv = Version(__version__)
  File "/usr/local/miniconda/lib/python3.7/site-packages/packaging/version.py", line 221, in __init__
    raise InvalidVersion("Invalid version: '{0}'".format(version))
packaging.version.InvalidVersion: Invalid version: ''

Is there a new, recommended method for building images ? Here, we simply modified setup.cfg and created the image with

docker build -t fmriprep-t2s .

@effigies
Copy link
Member

Ah, yeah, those do not reflect the current process:

https://github.com/poldracklab/fmriprep/blob/a6029eda7a418cea2d9f7326e6d455afa2c5acb4/.circleci/config.yml#L61-L67

And the critical one is --build-arg VERSION, and THISVERSION is just the output of python get_version.py. So:

docker build -t fmriprep-t2s --build-arg VERSION=$( python get_version.py ) .

I'll update the docs. Thanks for pointing this out.

@effigies
Copy link
Member

@emdupre If you care to review the updated docs: #1797.

@emdupre
Copy link
Collaborator Author

emdupre commented Sep 27, 2019

Closed with #1797

@emdupre emdupre closed this as completed Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants