Skip to content

Commit

Permalink
download templates into image
Browse files Browse the repository at this point in the history
  • Loading branch information
36000 committed Jan 23, 2024
1 parent c434991 commit f9267cb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bin/pyAFQ
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,32 @@ def parse_cli(arg_dict):
opts.verbose, opts.dry_run, opts.to_call, opts.generate_json


def download_templates():
from AFQ.data.fetch import (
read_templates,
read_pediatric_templates,
read_callosum_templates,
read_cp_templates,
read_or_templates,
read_ar_templates)

read_templates()
read_pediatric_templates()
read_callosum_templates()
read_cp_templates()
read_or_templates()
read_ar_templates()


if __name__ == '__main__':
arg_dict = afb.func_dict_to_arg_dict(logger=logger)
config_file, generate_only, overwrite, verbose,\
dry_run, to_call, generate_json =\
parse_cli(arg_dict)

if config_file == "download":
download_templates()
exit()

if generate_only and generate_json:
raise ValueError("Can only generate .toml or .json; not both")
Expand Down
1 change: 1 addition & 0 deletions gpu_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ RUN cd /opt/GPUStreamlines/build/cuslines && pip install -e .

# Install pyAFQ
RUN cd /opt/pyAFQ && pip install -e .
RUN /opt/pyAFQ/bin/pyAFQ download

ENTRYPOINT ["/opt/pyAFQ/bin/pyAFQ"]
2 changes: 2 additions & 0 deletions gpu_docker/cuda_track_template.def
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,7 @@ From: nvidia/cuda:12.0.1-devel-ubuntu20.04
# Install pyAFQ
pip install -e /opt/pyAFQ

/opt/pyAFQ/bin/pyAFQ download

%runscript
exec /opt/pyAFQ/bin/pyAFQ "$@"
1 change: 1 addition & 0 deletions pyafq_docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ ARG COMMIT
# Install pyAFQ
RUN pip install --no-cache-dir git+https://github.com/yeatmanlab/pyAFQ.git@${COMMIT}
RUN pip install fslpy
RUN pyAFQ download

ENTRYPOINT ["pyAFQ"]

0 comments on commit f9267cb

Please sign in to comment.