Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6 from flywheel-apps/docker-refactor
Browse files Browse the repository at this point in the history
Base container off bids-client
  • Loading branch information
ehlertjd authored Apr 27, 2018
2 parents 5bd426f + 1d0aa47 commit fe0ca16
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 33 deletions.
32 changes: 2 additions & 30 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,16 @@
# curate-bids

FROM python:2.7
FROM flywheel/bids-client:0.5.2
MAINTAINER Flywheel <[email protected]>

# Install JQ to parse config file
RUN apt-get update && apt-get -y install jq

# Install jsonschema and dateutil
RUN pip install jsonschema==2.6.0 python-dateutil==2.6.1

# Install python SDK
RUN pip install https://github.com/flywheel-io/sdk/releases/download/0.3.0/flywheel-0.3.0-py2-none-linux_x86_64.whl
RUN apk add --no-cache jq

# Make directory for flywheel spec (v0)
ENV FLYWHEEL /flywheel/v0
RUN mkdir -p ${FLYWHEEL}
COPY run ${FLYWHEEL}/run
COPY manifest.json ${FLYWHEEL}/manifest.json

# Copy code into place
ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/curate_bids.py ${FLYWHEEL}/curate_bids.py

ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/supporting_files/__init__.py ${FLYWHEEL}/supporting_files/__init__.py
ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/supporting_files/bidsify_flywheel.py ${FLYWHEEL}/supporting_files/bidsify_flywheel.py
ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/supporting_files/classifications.py ${FLYWHEEL}/supporting_files/classifications.py
ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/supporting_files/project_tree.py ${FLYWHEEL}/supporting_files/project_tree.py
ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/supporting_files/resolver.py ${FLYWHEEL}/supporting_files/resolver.py
ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/supporting_files/templates.py ${FLYWHEEL}/supporting_files/templates.py
ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/supporting_files/utils.py ${FLYWHEEL}/supporting_files/utils.py

ADD https://raw.githubusercontent.com/flywheel-io/bids-client/master/templates/bids-v1.json ${FLYWHEEL}/templates/bids-v1.json

RUN chmod +x ${FLYWHEEL}/curate_bids.py
RUN chmod +x ${FLYWHEEL}/supporting_files/__init__.py
RUN chmod +x ${FLYWHEEL}/supporting_files/bidsify_flywheel.py
RUN chmod +x ${FLYWHEEL}/supporting_files/classifications.py
RUN chmod +x ${FLYWHEEL}/supporting_files/project_tree.py
RUN chmod +x ${FLYWHEEL}/supporting_files/resolver.py
RUN chmod +x ${FLYWHEEL}/supporting_files/templates.py
RUN chmod +x ${FLYWHEEL}/supporting_files/utils.py

# Set the entrypoint
ENTRYPOINT ["/flywheel/v0/run"]
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"maintainer": "Flywheel <[email protected]>",
"source": "https://github.com/flywheel-apps/curate-bids",
"url": "http://bids.neuroimaging.io/",
"version": "0.3.6",
"version": "0.5.0",
"custom": {
"docker-image": "flywheel/curate-bids:v0.3.6"
"docker-image": "flywheel/curate-bids:v0.5.0"
},
"license": "BSD-3-Clause",
"inputs": {
Expand Down
2 changes: 1 addition & 1 deletion run
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fi
echo "BIDS Curation templates are being run on entire Project for session: $CONFIG_SESSIONID"

# Run curate_bids python script
python /flywheel/v0/curate_bids.py --api-key $APIKEY --session "$CONFIG_SESSIONID" ${RESET_FLAG}
curate_bids --api-key $APIKEY --session "$CONFIG_SESSIONID" ${RESET_FLAG}
curate_exit_status=$?

##############################################################################
Expand Down

0 comments on commit fe0ca16

Please sign in to comment.