Skip to content

Commit

Permalink
Pythondeps (#8)
Browse files Browse the repository at this point in the history
* include all hippunfold pythondeps, update dockerfile, replace circleci with gh actions

so we can remove these dependencies from the hippunfold repo

note: still WIP
  • Loading branch information
akhanf authored Sep 21, 2023
1 parent 13ca403 commit f2034e4
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 225 deletions.
225 changes: 0 additions & 225 deletions .circleci/config.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/deploy_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Publish Docker image

on:
workflow_dispatch:
release:
types: [published]

jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: |
${{ github.repository }}
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ RUN cd /tmp/JCC-3.10 && python setup.py install && \
cd /opt && git clone http://github.com/nighres/nighres && cd /opt/nighres && git checkout 1901ce9a9afdfad8e2d66ec09600fbfb9fa0151d && ./build.sh && cd /opt/nighres && pip install . && \
rm -rf /opt/nighres /tmp/JCC-3.10 /tmp/JCC-3.10.tar.gz

COPY . /src

ENV SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL True
RUN pip install --no-cache-dir /src && \
apt install -y graphviz && \
wget https://imagemagick.org/archive/binaries/magick && \
mv magick /usr/bin && chmod a+x /usr/bin/magick

ENV LD_LIBRARY_PATH /opt/itksnap/lib/:/opt/niftyreg-1.3.9/lib:/opt/workbench/libs_linux64:/opt/workbench/libs_linux64_software_opengl:${LD_LIBRARY_PATH}
ENV PATH /opt/conda/bin:/opt/itksnap/bin/:/opt/niftyreg-1.3.9/bin:/opt/workbench/bin_linux64:/opt/ants-2.3.1-minify:/opt/fsl-5.0.11/bin-minify:$PATH

Expand Down
Empty file added autotop_deps/__init__.py
Empty file.
28 changes: 28 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[tool.poetry]
name = "autotop_deps"
version = "0.5.0"
description = "Dependencies for HippUnfold"
authors = ["Jordan DeKraker & Ali Khan <[email protected]>"]

[tool.poetry.dependencies]
python = ">=3.7.1,<3.10"
batchgenerators = "0.21"
nnunet-inference-on-cpu-and-gpu = "1.6.6"
numpy = "1.21.2"
astropy = "^4.0,<=4.3.1"
pandas = "^1.2.0,<=1.3.0"
nibabel = "^3.2.1"
scipy = "1.7.1"
nilearn = "^0.8.1"
seaborn = "^0.11.2"
scikit-fmm = "^2022.03.26"
simpleitk = "2.0.2"
matplotlib = "3.4.2"
torch = "1.10.0"


[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

0 comments on commit f2034e4

Please sign in to comment.