-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (38 loc) · 1.33 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM ghcr.io/imagination-ai/base-python:main as base
RUN mkdir -p /build/tests
RUN mkdir /applications
COPY requirements.txt /build/requirements.txt
RUN pip3 install -r /build/requirements.txt
#RUN pip3 install \ # --no-color --progress-bar off \
#-r /build/requirements.txt \
#-r /build/requirements-test.txt # | ts -i '%.S'
COPY requirements-test.txt /build/requirements-test.txt
RUN pip3 install -r /build/requirements-test.txt
COPY .isort.cfg /build/.isort.cfg
COPY pytest.ini /build/pytest.ini
COPY .flake8 /build/.flake8
ENV APP_RESOURCE_DIR /applications
ENV PYTHONPATH /applications
ARG skip_tests
##### 1. Leaf Image: Signs #####
FROM base as nonvital-vital-signs
COPY src/signs /build/signs
COPY tests/signs/tests /build/tests
RUN \
if [ "$skip_tests" = "" ] ; then \
black \
-t py39 -l 80 \
--check $(find /build/signs /build/tests -name "*.py") \
&& \
# isort --df --settings-path=/build/.isort.cfg --check /build/signs \
#&& \
flake8 --config=/build/.flake8 /build/signs \
&& \
pytest /build/tests ; \
else \
echo "Skipping tests" ; \
fi
RUN mv /build/signs /applications/signs
EXPOSE 8080
COPY entrypoints/signs-app-entrypoint.sh /applications/signs-app-entrypoint.sh
ENTRYPOINT ["sh", "/applications/signs-app-entrypoint.sh"]