This repository has been archived by the owner on Feb 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* base image * docker build * fix init imports * docker: add Fiji * docker: add ANTs * docker: add ANTsPy * docker: add elastix * docker: add DROP * docker: add RNiftyREg * update tox / travis
- Loading branch information
Showing
8 changed files
with
369 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish Docker Image | ||
# https://www.docker.com/blog/first-docker-github-action-is-here | ||
# https://github.com/docker/build-push-action | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-push: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python_version: [3.6, 3.7] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Build and Publish to Docker Hub | ||
# publish master | ||
uses: docker/build-push-action@v1.1.0 | ||
# TODO: push to master | ||
# if: github.event_name == 'push' | ||
with: | ||
repository: borda/birl | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
dockerfile: bm_experiments/Dockerfile | ||
build_args: PYTHON_VERSION=${{ matrix.python_version }} | ||
tags: "SOTA-py${{ matrix.python_version }}" | ||
# timeout-minutes: 50 |
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
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
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
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,27 +1,38 @@ | ||
import os | ||
import subprocess | ||
from distutils.version import LooseVersion | ||
|
||
import matplotlib | ||
import numpy as np | ||
import pandas as pd | ||
try: | ||
import matplotlib | ||
except ImportError: | ||
print('Package `matplotlib` which shall be configured are missing...') | ||
else: | ||
CMD_TRY_MATPLOTLIB = 'python -c "from matplotlib import pyplot; pyplot.close(pyplot.figure())"' | ||
# in case you are running on machine without display, e.g. server | ||
if not os.environ.get('DISPLAY', '') and matplotlib.rcParams['backend'] != 'agg': | ||
print('No display found. Using non-interactive Agg backend') | ||
matplotlib.use('Agg') | ||
# _tkinter.TclError: couldn't connect to display "localhost:10.0" | ||
elif subprocess.call(CMD_TRY_MATPLOTLIB, stdout=None, stderr=None, shell=True): | ||
print('Problem with display. Using non-interactive Agg backend') | ||
matplotlib.use('Agg') | ||
|
||
|
||
CMD_TRY_MATPLOTLIB = 'python -c "from matplotlib import pyplot; pyplot.close(pyplot.figure())"' | ||
# in case you are running on machine without display, e.g. server | ||
if not os.environ.get('DISPLAY', '') and matplotlib.rcParams['backend'] != 'agg': | ||
print('No display found. Using non-interactive Agg backend') | ||
matplotlib.use('Agg') | ||
# _tkinter.TclError: couldn't connect to display "localhost:10.0" | ||
elif subprocess.call(CMD_TRY_MATPLOTLIB, stdout=None, stderr=None, shell=True): | ||
print('Problem with display. Using non-interactive Agg backend') | ||
matplotlib.use('Agg') | ||
try: | ||
import numpy as np | ||
except ImportError: | ||
print('Package `numpy` which shall be configured are missing...') | ||
else: | ||
# comparing strings does not work for version lower 1.10 | ||
if LooseVersion(np.version.full_version) >= LooseVersion('1.14'): | ||
# np.set_printoptions(sign='legacy') | ||
np.set_printoptions(legacy='1.13') | ||
|
||
# parse the numpy versions | ||
np_version = [int(i) for i in np.version.full_version.split('.')] | ||
# comparing strings does not work for version lower 1.10 | ||
if np_version >= [1, 14]: | ||
# np.set_printoptions(sign='legacy') | ||
np.set_printoptions(legacy='1.13') | ||
|
||
# default display size was changed in pandas v0.23 | ||
pd.set_option('display.max_columns', 20) | ||
try: | ||
import pandas as pd | ||
except ImportError: | ||
print('Package `pandas` which shall be configured are missing...') | ||
else: | ||
# default display size was changed in pandas v0.23 | ||
pd.set_option('display.max_columns', 20) |
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
Oops, something went wrong.