FROM centos:centos7

RUN yum -y update
RUN yum install -y gcc
RUN yum install -y libgfortran
RUN yum install -y git

#
# Python 3.6 (pip3 install is enough)
#
RUN yum install -y https://centos7.iuscommunity.org/ius-release.rpm
RUN yum install -y python36u python36u-libs python36u-devel python36u-pip

RUN pip3 install numpy
RUN pip3 install scipy
RUN pip3 install pytest
RUN pip3 install pandas
RUN pip3 install spiceypy==2.3.2
RUN pip3 install html-testRunner
RUN pip3 install bs4

COPY adcsng root/adcsng/

WORKDIR /root

RUN mkdir temp log

#
# Install ADCSng
#
WORKDIR /root/adcsng
RUN pip3 install -e .

#
# Run ADCSng regression tests
#
WORKDIR /root/adcsng/adcsng/tests
RUN python3 test_regression.py

#
# Back to the root
#
WORKDIR /root


