forked from HBPMedical/algorithm-repository
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (30 loc) · 1.22 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
## Run unit tests
FROM hbpmip/python-base-build:0.4.5
COPY requirements-dev.txt /requirements-dev.txt
RUN pip install -r /requirements-dev.txt
COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
COPY knn.py /src/knn.py
COPY tests/unit/ /src/tests/
WORKDIR /src
RUN pytest tests/ -x --ff --capture=no
## Build target image
FROM hbpmip/python-mip-sklearn:0.3.3
ENV DOCKER_IMAGE=hbpmip/python-knn:0.2.2 \
FUNCTION=python-knn
COPY requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
COPY knn.py /knn.py
ENTRYPOINT ["python", "/knn.py"]
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="hbpmip/python-knn" \
org.label-schema.description="Python implementation of sgd-regression" \
org.label-schema.url="https://github.com/LREN-CHUV/algorithm-repository" \
org.label-schema.vcs-type="git" \
org.label-schema.vcs-url="https://github.com/LREN-CHUV/algorithm-repository.git" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.version="$VERSION" \
org.label-schema.vendor="LREN CHUV" \
org.label-schema.license="AGPLv3" \
org.label-schema.docker.dockerfile="Dockerfile" \
org.label-schema.schema-version="1.0"