diff --git a/.envtemplate b/.envtemplate index 2265975..3b181c3 100644 --- a/.envtemplate +++ b/.envtemplate @@ -15,7 +15,6 @@ AUTOBIDS_DICOM_SERVER_STUDYINSTANCEUID_WILDCARD="" # Falsy AUTOBIDS_CFMM2TAR_PATH="/images/cfmm2tar.sif" AUTOBIDS_CFMM2TAR_BINDS="/home:/home,/tmp:/tmp" AUTOBIDS_CFMM2TAR_DOWNLOAD_DIR="" -AUTOBIDS_CFMM2TAR_STORAGE_DIR="" AUTOBIDS_CFMM2TAR_TIMEOUT=100000 AUTOBIDS_TAR2BIDS_PATH="/images/tar2bids.sif" AUTOBIDS_TAR2BIDS_BINDS="/home:/home,/tmp:/tmp" @@ -35,7 +34,7 @@ AUTOBIDS_ARCHIVE_SSH_PORT=2222 AUTOBIDS_ARCHIVE_SSH_KEY="~/.ssh/id_rsa.pub" AUTOBIDS_ARCHIVE_TIMEOUT=100000 -AUTOBIDS_DICOM_PI_BLACKLIST = [] +AUTOBIDS_DICOM_PI_BLACKLIST = [] AUTOBIDS_HEURISTIC_GIT_URL="git@github.com:example/heuristics.git" AUTOBIDS_HEURISTIC_REPO_PATH="" diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index 6978bde..0000000 --- a/.pylintrc +++ /dev/null @@ -1,9 +0,0 @@ -[MASTER] -# List of plugins (as comma separated values of python module names) to load, -# usually to register additional checkers. -load-plugins=pylint_flask,pylint_flask_sqlalchemy,pylint_pytest,pylint.extensions.comparetozero,pylint.extensions.redefined_variable_type,pylint.extensions.while_used,pylint.extensions.mccabe,pylint.extensions.typing,pylint.extensions.docstyle,pylint.extensions.private_import,pylint.extensions.broad_try_clause,pylint.extensions.comparison_placement,pylint.extensions.for_any_all,pylint.extensions.check_elif,pylint.extensions.docparams,pylint.extensions.empty_comment,pylint.extensions.code_style,pylint.extensions.eq_without_hash,pylint.extensions.overlapping_exceptions,pylint.extensions.redefined_loop_name,pylint.extensions.bad_builtin,pylint.extensions.no_self_use,pylint.extensions.set_membership,pylint.extensions.consider_ternary_expression,pylint.extensions.confusing_elif,pylint.extensions.emptystring -generated-members=db.session.*,self.notifications.*,err.__cause__.*,app.logger, datalad.api.* -ignored-classes=Tar2bidsRunForm,StudyConfigForm - -[SIMILARITIES] -ignore-imports=yes diff --git a/Dockerfile b/Dockerfile index d99edb9..9db2e46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,6 @@ COPY --from=apptainer-builds /opt/apptainer-images /opt/apptainer-images/ ENV OTHER_OPTIONS='--tls-aes' WORKDIR /opt/autobidsportal -COPY ./entrypoint.sh /opt/autobidsportal/entrypoint.sh COPY ./autobidsportal.ini.example autobidsportal.ini COPY ./bids_form.py . @@ -75,11 +74,10 @@ RUN git config --system user.name "Autobids Portal" \ && git config --system user.email "autobids@dummy.com" \ && WHEEL=$(ls /opt/wheels | grep whl) \ && pip install --no-cache-dir "/opt/wheels/${WHEEL}[deploy]" \ - && rm -r /opt/wheels \ - && chmod +x /opt/autobidsportal/entrypoint.sh + && rm -r /opt/wheels ENV DCM4CHE_VERSION=5.24.1 ENV PATH=/apps/dcm4che/dcm4che-${DCM4CHE_VERSION}/bin:/apps/DicomRaw:/apps/cfmm2tar:/opt/apptainer/bin:$PATH ENV _JAVA_OPTIONS="-Xmx2048m" -ENTRYPOINT ["/opt/autobidsportal/entrypoint.sh"] +CMD ["uwsgi", "--ini=autobidsportal.ini"] \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 0336b75..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -recursive-include autobidsportal/templates *.html -recursive-include autobidsportal/static *.css -include autobidsportal/resources/bidsignore.default diff --git a/compose.yaml b/compose.yaml index a711124..6a98c13 100644 --- a/compose.yaml +++ b/compose.yaml @@ -11,7 +11,6 @@ services: AUTOBIDS_LOG_LEVEL: INFO AUTOBIDS_ROOT_URL: autobidsportal AUTOBIDS_CFMM2TAR_DOWNLOAD_DIR: /cfmm2tar-download - AUTOBIDS_CFMM2TAR_STORAGE_DIR: /tar-files AUTOBIDS_TAR2BIDS_DOWNLOAD_DIR: /datasets AUTOBIDS_TAR2BIDS_TEMP_DIR: /tmp AUTOBIDS_HEURISTIC_REPO_PATH: /home @@ -37,10 +36,6 @@ services: AUTOBIDS_DICOM_SERVER_PASSWORD: "password" AUTOBIDS_DICOM_SERVER_TLS: "true" AUTOBIDS_DICOM_SERVER_STUDYINSTANCEUID_WILDCARD: "false" - AUTOBIDS_GITLAB_ACTIVE: "true" - AUTOBIDS_GITLAB_URL: "http://127.0.0.1:8080" - AUTOBIDS_GITLAB_TOKEN: "BFavxxb7gAodznnorhv7" - AUTOBIDS_GITHUB_ACTIVE: "false" GIT_AUTHOR_NAME: "Autobids Portal" GIT_AUTHOR_EMAIL: "autobids@example.com" GIT_COMMITER_NAME: "Autobids Portal" diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100644 index 13bd99a..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# Set to exit on error -set -e - -# Functions -ssh_known_hosts() { - # This causes problems if run as part of docker compose, but keeping this - # in here as a hint for what to run - echo "Gathering public ssh keys of services..." - ssh-keyscan -p 2222 archive >> /etc/ssh/ssh_known_hosts - ssh-keyscan -p 2222 ria >> /etc/ssh/ssh_known_hosts - echo "Finished gathering keys." -} - - -flask_db() { - # Upgrade db task - echo "Upgrading flask database..." - flask db upgrade -d /usr/local/lib/python3.9/dist-packages/autobidsportal_migrations/ - echo "Completed database upgrade." -} - - -init() { - # Init web app task - echo "+----------------------------+" - echo "| Starting autobidsportal... |" - echo "+----------------------------+" - uwsgi --ini=autobidsportal.ini -} - - -# Main body of code -flask_db -init \ No newline at end of file