File tree Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,21 @@ RUN apt-get -qq update && \
9
9
shellcheck libeigen3-dev clang-format > /dev/null && \
10
10
python -m pip install --quiet --upgrade pip
11
11
12
+ COPY elasticdl_client/requirements.txt /requirements.txt
13
+ RUN python -m pip install --quiet -r /requirements.txt \
14
+ --extra-index-url=$EXTRA_PYPI_INDEX \
15
+ && rm /requirements.txt
16
+
17
+ COPY elasticdl_preprocessing/requirements.txt /requirements.txt
18
+ RUN python -m pip install --quiet -r /requirements.txt \
19
+ --extra-index-url=$EXTRA_PYPI_INDEX \
20
+ && rm /requirements.txt
21
+
22
+ COPY elasticdl_preprocessing/requirements-dev.txt /requirements-dev.txt
23
+ RUN python -m pip install --quiet -r /requirements-dev.txt \
24
+ --extra-index-url=$EXTRA_PYPI_INDEX \
25
+ && rm /requirements-dev.txt
26
+
12
27
COPY elasticdl/requirements.txt /requirements.txt
13
28
RUN python -m pip install --quiet -r /requirements.txt \
14
29
--extra-index-url=$EXTRA_PYPI_INDEX \
Original file line number Diff line number Diff line change 15
15
16
16
from elasticdl_client .common .constants import DistributionStrategy
17
17
18
+ DEFAULT_BASE_IMAGE = "python:3.6"
19
+
18
20
19
21
def add_zoo_init_params (parser ):
20
22
parser .add_argument (
21
23
"--base_image" ,
22
24
type = str ,
23
- default = "python:3.6" ,
25
+ default = DEFAULT_BASE_IMAGE ,
24
26
help = "Base Docker image." ,
25
27
)
26
28
parser .add_argument (
Original file line number Diff line number Diff line change 13
13
14
14
import unittest
15
15
16
+ from elasticdl_client .common .args import DEFAULT_BASE_IMAGE
16
17
from elasticdl_client .main import build_argument_parser
17
18
18
19
@@ -23,7 +24,7 @@ def setUp(self):
23
24
def test_parse_zoo_init (self ):
24
25
args = ["zoo" , "init" ]
25
26
args = self ._parser .parse_args (args )
26
- self .assertEqual (args .base_image , "python:latest" )
27
+ self .assertEqual (args .base_image , DEFAULT_BASE_IMAGE )
27
28
args .func (args )
28
29
29
30
args = ["zoo" , "init" , "--base_image=elasticdl:base" ]
Original file line number Diff line number Diff line change @@ -22,7 +22,11 @@ sh scripts/build.sh
22
22
go test -v -cover ./...
23
23
)
24
24
25
- pytest elasticdl/python/tests elasticdl_preprocessing/tests \
26
- --cov=elasticdl/python --cov-report=xml
25
+ # Run Python unittests
26
+ pytest elasticdl/python/tests \
27
+ elasticdl_preprocessing/tests \
28
+ elasticdl_client/tests \
29
+ --cov=elasticdl/python \
30
+ --cov-report=xml
27
31
mkdir -p ./build
28
32
mv coverage.xml ./build
You can’t perform that action at this time.
0 commit comments