Skip to content

Commit

Permalink
- Cleanud up dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaellh0079 committed Apr 22, 2024
1 parent 661a86b commit 344f4ce
Showing 1 changed file with 18 additions and 23 deletions.
41 changes: 18 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
ARG HOME='/home/worker'
ARG BUILD=${HOME}/build

FROM opendap/besd:3.21.0-272 AS base
HEALTHCHECK NONE

Expand All @@ -10,35 +7,33 @@ RUN yum -y update && \
RUN yum install -y nano && \
yum install -y wget

ARG HOME
WORKDIR $HOME
ARG HOME='/home/worker'
WORKDIR ${HOME}
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.10.0-1-Linux-x86_64.sh -O miniconda.sh && \
bash miniconda.sh -b -p ${HOME}/miniconda && \
rm miniconda.sh && \
source ${HOME}/miniconda/bin/activate && \
conda init --all
ENV PATH="${HOME}/miniconda/bin:${PATH}"
rm miniconda.sh

ARG BUILD
ENV PATH="${HOME}/miniconda/bin:${PATH}"
ARG BUILD=${HOME}/build
WORKDIR ${BUILD}

COPY setup.py requirements*txt ./
RUN pip install -r requirements.txt
COPY dmrpp_generator ./dmrpp_generator
COPY generate_dmrpp.py ./generate_dmrpp.py
COPY tests ./tests

RUN python setup.py install

RUN pip install ipython && \
pip install pytest && \
pip install coverage
RUN coverage run -m pytest
RUN coverage report
RUN coverage lcov -o ./coverage/lcov.info
RUN rm -rf tests .coverage .pytest_cache

ARG BUILD
COPY setup.py requirements*txt generate_dmrpp.py ./
COPY dmrpp_generator ./dmrpp_generator/
COPY tests ./tests/
RUN pip install -r requirements.txt && \
python setup.py install

RUN coverage run -m pytest && \
coverage report && \
coverage lcov -o ./coverage/lcov.info && \
rm -rf tests .coverage .pytest_cache && \
pip uninstall pytest -y && \
pip uninstall coverage -y

RUN pip install --target $BUILD awslambdaric
COPY site.conf /etc/bes/

Expand Down

0 comments on commit 344f4ce

Please sign in to comment.