Skip to content

Commit

Permalink
feat(AutoML): dockerized AUCMEDI AutoML - closes #150
Browse files Browse the repository at this point in the history
  • Loading branch information
muellerdo committed Jul 5, 2022
1 parent 1604fa1 commit 96c8d44
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 20 deletions.
59 changes: 59 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#==============================================================================#
# Author: Dominik Müller #
# Copyright: 2022 IT-Infrastructure for Translational Medical Research, #
# University of Augsburg #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
#==============================================================================#
#-----------------------------------------------------#
# Information & System Base #
#-----------------------------------------------------#
# Base image
FROM tensorflow/tensorflow:latest-gpu

# Meta information
LABEL authors="Dominik Müller"
LABEL contact="dominik.mueller@informatik.uni-augsburg.de"
LABEL repository="https://github.com/frankkramer-lab/aucmedi"
LABEL license="GNU General Public License v3.0"

#-----------------------------------------------------#
# Setup #
#-----------------------------------------------------#
# Setup system environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PIP_ROOT_USER_ACTION=ignore

# Copy git repository into container
ADD . /root/aucmedi

# Install required software dependencies (cv2)
RUN apt-get update && \
apt-get install -y --no-install-recommends python3-opencv && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Update Python pip
RUN python -m pip install pip --upgrade

# Install AUCMEDI from local git repo
RUN python -m pip install /root/aucmedi

# Create working directory
VOLUME ["/data"]
WORKDIR /data

#-----------------------------------------------------#
# Startup #
#-----------------------------------------------------#
ENTRYPOINT ["aucmedi"]
20 changes: 0 additions & 20 deletions aucmedi/automl/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ def cli_core():
# "--help",
# action="help",
# help="show this help message and exit")
#
# # Help page hook for passing no parameters
# if len(sys.argv)==2 and sys.argv[1] == "yaml":
# parser_yaml.print_help(sys.stderr)
# sys.exit(1)

#-----------------------------------------------------#
# CLI - Training #
Expand Down Expand Up @@ -192,11 +187,6 @@ def cli_training(subparsers):
action="help",
help="show this help message and exit")

# Help page hook for passing no parameters
if len(sys.argv)==2 and sys.argv[1] == "training":
parser_train.print_help(sys.stderr)
sys.exit(1)

#-----------------------------------------------------#
# CLI - Prediction #
#-----------------------------------------------------#
Expand Down Expand Up @@ -273,11 +263,6 @@ def cli_prediction(subparsers):
action="help",
help="show this help message and exit")

# Help page hook for passing no parameters
if len(sys.argv)==2 and sys.argv[1] == "prediction":
parser_predict.print_help(sys.stderr)
sys.exit(1)

#-----------------------------------------------------#
# CLI - Evaluation #
#-----------------------------------------------------#
Expand Down Expand Up @@ -339,8 +324,3 @@ def cli_evaluation(subparsers):
"--help",
action="help",
help="show this help message and exit")

# Help page hook for passing no parameters
if len(sys.argv)==2 and sys.argv[1] == "evaluation":
parser_evaluate.print_help(sys.stderr)
sys.exit(1)
12 changes: 12 additions & 0 deletions docs/automl/docker/usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@


docker run ghcr.io/frankkramer-lab/aucmedi:latest training

Volumes:
If you intended to pass a host directory, use absolute path.!!!

Be aware of user changes due to docker volume
-> created files will have user and group root


docker run -v /home/mudomini/projects/testing_area/aucmedi.automl:/data --rm -it domi:latest prediction

0 comments on commit 96c8d44

Please sign in to comment.