-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
79 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected] | ||
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/[email protected] | ||
# 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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
- name: Run Pre-Commit | ||
uses: pre-commit/[email protected] | ||
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" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 ([email protected])" | ||
# Labels | ||
LABEL maintainer="Siddhartha Dhiman ([email protected])" | ||
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 |