-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
31 lines (31 loc) · 1020 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM opendap/besd:3.20.13-664
RUN yum -y update && \
yum -y upgrade
HEALTHCHECK NONE
# Adding a user
RUN adduser worker
RUN yum install -y nano && \
yum install -y wget
USER worker
WORKDIR /home/worker
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh && \
bash Miniconda3-py38_4.8.2-Linux-x86_64.sh -b && \
rm Miniconda3-py38_4.8.2-Linux-x86_64.sh
ENV HOME="/home/worker" PATH="/home/worker/miniconda3/bin:${PATH}"
RUN pip install ipython &&\
pip install pytest
RUN mkdir $HOME/build
ENV BUILD=$HOME/build
COPY --chown=worker setup.py requirements*txt $BUILD/
RUN pip install -r $BUILD/requirements.txt
COPY --chown=worker dmrpp_generator $BUILD/dmrpp_generator
COPY --chown=worker generate_dmrpp.py $BUILD/generate_dmrpp.py
COPY --chown=worker tests $BUILD/tests
RUN \
cd $BUILD; \
python setup.py install
WORKDIR $BUILD
RUN pytest --junitxml=./test_results/test_dmrpp_generator.xml tests && \
rm -rf tests
CMD ["python", "generate_dmrpp.py"]
ENTRYPOINT []