From 2abd2cd68d95d7805daa646238eed3d10a00f80f Mon Sep 17 00:00:00 2001 From: Siddhartha Dhiman Date: Fri, 3 Nov 2023 12:11:27 -0400 Subject: [PATCH] Save progress for MR move --- .github/workflows/pydesigner_build.yml | 74 +++++++++++++------------- .github/workflows/pydesigner_ci.yml | 20 +++++-- Dockerfile | 52 +++++++++--------- 3 files changed, 79 insertions(+), 67 deletions(-) diff --git a/.github/workflows/pydesigner_build.yml b/.github/workflows/pydesigner_build.yml index b9ead38a..ef11bce5 100644 --- a/.github/workflows/pydesigner_build.yml +++ b/.github/workflows/pydesigner_build.yml @@ -1,39 +1,39 @@ -name: Docker Build and Push +# name: Docker Build and Push -on: - push: - tags: - - '**' +# on: +# push: +# tags: +# - '**' -jobs: - docker: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v3 - - - name: Fetch version - uses: SebRollen/toml-action@v1.0.2 - id: version - with: - file: 'pyproject.toml' - field: 'tool.poetry.version' - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - push: true - tags: dmri/neurodock:latest,dmri/neurodock:${{ steps.version.outputs.value }} +# jobs: +# docker: +# runs-on: ubuntu-latest +# steps: +# - +# name: Checkout +# uses: actions/checkout@v3 +# - +# name: Fetch version +# uses: SebRollen/toml-action@v1.0.2 +# id: version +# with: +# file: 'pyproject.toml' +# field: 'tool.poetry.version' +# - +# name: Set up QEMU +# uses: docker/setup-qemu-action@v3 +# - +# name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v3 +# - +# name: Login to Docker Hub +# uses: docker/login-action@v3 +# with: +# username: ${{ secrets.DOCKERHUB_USERNAME }} +# password: ${{ secrets.DOCKERHUB_TOKEN }} +# - +# name: Build and push +# uses: docker/build-push-action@v5 +# with: +# push: true +# tags: dmri/neurodock:latest,dmri/neurodock:${{ steps.version.outputs.value }} diff --git a/.github/workflows/pydesigner_ci.yml b/.github/workflows/pydesigner_ci.yml index a8860983..5eafe0d2 100644 --- a/.github/workflows/pydesigner_ci.yml +++ b/.github/workflows/pydesigner_ci.yml @@ -5,10 +5,24 @@ on: push: branches: [main] + jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.0 + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + - name: Run Pre-Commit + uses: pre-commit/action@v3.0.0 + with: + pre-commit_version: latest + python_version: 3.8 + system: true + # - name: Auto-commit changed files + # uses: stefanzweifel/git-auto-commit-action@v5 + # with: + # commit_message: "Pre-commit fixes" + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 51eef72d..723a0cd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,61 +14,57 @@ # ============================================================================== # Load base Ubuntu image -FROM debian:buster-slim +FROM python:3.11-bullseye -# Add LABEL Information -# ARG BUILD_DATE -# ARG VCS_REF - -# Labels. -LABEL maintainer="Siddhartha Dhiman (dhiman@musc.edu)" +# Labels +LABEL maintainer="Siddhartha Dhiman (siddhartha.dhiman@gmail.com)" LABEL org.label-schema.schema-version="1.0.0-rc1" -LABEL org.label-schema.build-date=$BUILD_DATE LABEL org.label-schema.name="dmri/pydesigner" LABEL org.label-schema.description="A state-of-the-art difusion and kurtosis MRI processing pipeline" LABEL org.label-schema.url="https://github.com/m-ama/" LABEL org.label-schema.vcs-url="https://github.com/m-ama/NeuroDock.git" -LABEL org.label-schema.vcs-ref=$VCS_REF -LABEL org.label-schema.vendor="MAMA" +LABEL org.label-schema.vendor="MUSC BRIDGE" -ARG DEBIAN_FRONTEND=noninteractive +# ARG DEBIAN_FRONTEND=noninteractive # Initial update -RUN apt-get update && \ +RUN apt update && \ apt-get install -y \ apt-utils \ wget \ curl \ nano \ software-properties-common \ - python2.7 python-pip \ + python3 \ python3-pip \ jq \ libblas-dev \ liblapack-dev \ libatlas-base-dev \ - gfortran - -# Install MRTRIX3 dependencies -RUN apt-get install -y --no-install-recommends \ - clang \ + gfortran \ git \ + g++ \ + python \ libeigen3-dev \ zlib1g-dev \ - libqt4-opengl-dev \ + libqt5opengl5-dev \ + libqt5svg5-dev \ libgl1-mesa-dev \ libfftw3-dev \ libtiff5-dev \ - libomp-dev - -RUN rm /bin/sh && ln -s /bin/bash /bin/sh + libpng-dev # Copy and install PyDesigner -RUN mkdir -p /tmp/PyDesigner -ADD . / /tmp/PyDesigner/ -RUN pip3 install /tmp/PyDesigner -RUN echo "alias python=python3" >> ~/.bashrc && source ~/.bashrc -RUN echo "alias pip=pip3" >> ~/.bashrc && source ~/.bashrc +RUN mkdir -p /pydesigner +COPY /pydesigner /app/pydesigner +COPY pyproject.toml app/ +RUN ls +RUN ls -la /app +WORKDIR /app +ENV PYTHONPATH=${PYTHONPATH}:${PWD} +RUN pip3 install poetry +RUN poetry config virtualenvs.create false +RUN poetry install --no-dev # Install Python dependencies RUN pip3 install --upgrade setuptools && \ @@ -104,3 +100,5 @@ ENV PATH=$PATH:/usr/lib/mrtrix3/bin # Remove unwanted packages RUN apt-get autoremove && apt-get clean RUN rm /tmp/fslinstaller.py && rm -r /tmp/PyDesigner + +USER bridge