-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from kaczmarj/add/pytests
WIP: Add/pytests
- Loading branch information
Showing
19 changed files
with
751 additions
and
532 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
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 @@ | ||
Dockerfile |
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,40 +1,70 @@ | ||
FROM ubuntu:bionic-20180526@sha256:c8c275751219dadad8fa56b3ac41ca6cb22219ff117ca98fe82b42f24e1ba64e | ||
USER root | ||
RUN apt-get update -y ; apt-get upgrade -y | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get install -y tcsh vim | ||
RUN apt-get install -y libxmu-dev libxt-dev libmotif-dev | ||
RUN apt-get install -y libxpm-dev libxi-dev libxmhtml-dev | ||
RUN apt-get install -y libglw1-mesa-dev libglu1-mesa-dev | ||
RUN apt-get install -y libglib2.0-dev libgsl-dev | ||
RUN apt-get install -y r-base m4 | ||
RUN apt-get install -y python-qt4 git | ||
RUN apt-get install -yq --no-install-recommends gcc | ||
RUN apt-get install -yq --no-install-recommends g++ | ||
RUN apt-get update -y -qq \ | ||
&& apt-get install -yq --no-install-recommends \ | ||
ca-certificates \ | ||
curl \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
libglib2.0-dev \ | ||
libglu1-mesa-dev \ | ||
libglw1-mesa-dev \ | ||
libgsl-dev \ | ||
libmotif-dev \ | ||
libxi-dev \ | ||
libxmhtml-dev \ | ||
libxmu-dev \ | ||
libxpm-dev \ | ||
libxt-dev \ | ||
m4 \ | ||
python-matplotlib \ | ||
python-numpy \ | ||
python-qt4 \ | ||
python-rpy2 \ | ||
python-tk \ | ||
r-base \ | ||
tcsh \ | ||
vim \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
####################################### | ||
# this copies source code from the host | ||
# into the image and invalidates the cache | ||
RUN mkdir /usr/afni_build_dir | ||
WORKDIR /usr/afni_build_dir | ||
RUN mkdir src .git | ||
ADD src src | ||
ADD .git .git | ||
# Copy AFNI source code. This can invalidate the build cache. | ||
ARG AFNI_ROOT=/opt/afni | ||
COPY [".", "$AFNI_ROOT/"] | ||
|
||
ENV PATH=$PATH:/usr/afni_build_dir/src/afni_src/abin | ||
ARG VERSION | ||
# RUN git checkout "${VERSION}" | ||
WORKDIR /usr/afni_build_dir/src | ||
ARG AFNI_MAKEFILE_SUFFIX=linux_ubuntu_16_64 | ||
ARG AFNI_WITH_COVERAGE="0" | ||
|
||
# o files are ignored by the repo but will | ||
# cause the build to fail. | ||
RUN make -f Makefile.linux_ubuntu_16_64 afni_src.tgz \ | ||
&& tar zxvf afni_src.tgz \ | ||
&& cd afni_src \ | ||
&& cp Makefile.linux_ubuntu_16_64 Makefile | ||
WORKDIR /usr/afni_build_dir/src/afni_src | ||
# RUN make libmri.so | ||
RUN make itall && mv linux_ubuntu_16_64 /opt/abin | ||
WORKDIR /opt/abin | ||
WORKDIR "$AFNI_ROOT/src" | ||
RUN \ | ||
if [ "$AFNI_WITH_COVERAGE" != "0" ]; then \ | ||
echo "Adding testing and coverage components" \ | ||
&& sed -i 's/# CPROF = /CPROF = -coverage /' Makefile.$AFNI_MAKEFILE_SUFFIX \ | ||
&& curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3 - --no-cache-dir \ | ||
&& pip3 install --no-cache-dir \ | ||
codecov \ | ||
pytest \ | ||
pytest-cov; \ | ||
fi \ | ||
\ | ||
# Clean AFNI src directory (*.o files can cause build to fail). | ||
&& make -f Makefile.$AFNI_MAKEFILE_SUFFIX afni_src.tgz \ | ||
&& mv afni_src.tgz .. \ | ||
&& cd .. \ | ||
\ | ||
# Empty the src directory, and replace with the contents of afni_src.tgz | ||
&& rm -rf src/ && mkdir src \ | ||
&& tar -xzf afni_src.tgz -C $AFNI_ROOT/src --strip-components=1 \ | ||
&& rm afni_src.tgz \ | ||
\ | ||
# Build AFNI. | ||
&& cd src \ | ||
&& cp Makefile.$AFNI_MAKEFILE_SUFFIX Makefile \ | ||
&& make itall \ | ||
&& mv $AFNI_MAKEFILE_SUFFIX $AFNI_ROOT/abin | ||
|
||
ENV PATH="$AFNI_ROOT/abin:$PATH" | ||
WORKDIR "$AFNI_ROOT" |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.