Skip to content

Commit

Permalink
Build - Simplify python SDK package installation (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ark-kun authored and k8s-ci-robot committed Jun 17, 2019
1 parent aee1b5e commit f477a4f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
11 changes: 1 addition & 10 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,10 @@ RUN bazel build -c opt --action_env=PATH --define=grpc_no_ares=true backend/src/
# Compile
FROM python:3.5 as compiler

RUN apt-get update -y && \
apt-get install --no-install-recommends -y -q default-jdk wget
RUN pip3 install setuptools==40.5.0

RUN wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.1/swagger-codegen-cli-2.4.1.jar -O /tmp/swagger-codegen-cli.jar

# WORKDIR /go/src/github.com/kubeflow/pipelines
WORKDIR /go/src/github.com/kubeflow/pipelines
COPY backend/api backend/api
COPY sdk sdk
WORKDIR /go/src/github.com/kubeflow/pipelines/sdk/python
RUN ./build.sh /kfp.tar.gz
RUN pip3 install /kfp.tar.gz
RUN python3 setup.py install

WORKDIR /samples
COPY ./samples .
Expand Down
11 changes: 6 additions & 5 deletions test/sample-test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ RUN apt-get update -y && \
apt-get install --no-install-recommends -y -q python3-pip default-jdk python3-setuptools python3-dev && \
apt-get install --no-install-recommends -y -q libssl-dev libffi-dev wget ssh

# Install swagger codegen
RUN wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.1/swagger-codegen-cli-2.4.1.jar -O /tmp/swagger-codegen-cli.jar

RUN pip3 install wheel
RUN pip3 install junit-xml
RUN pip3 install kubernetes==9.0.0
Expand All @@ -18,7 +15,11 @@ RUN pip3 install papermill==0.16.1
RUN pip3 install ipykernel==5.1.0
RUN pip3 install google-api-python-client==1.7.0

#Needs test/sample-test and the files needed to run sdk/python/build.sh
COPY . /python/src/github.com/kubeflow/pipelines
# Install python client, including DSL compiler.
COPY ./sdk/python /sdk/python
RUN cd /sdk/python && python3 setup.py install

COPY ./test/sample-test /python/src/github.com/kubeflow/pipelines/test/sample-test
COPY ./samples /python/src/github.com/kubeflow/pipelines/samples

ENTRYPOINT ["/python/src/github.com/kubeflow/pipelines/test/sample-test/run_test.sh"]
7 changes: 0 additions & 7 deletions test/sample-test/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,6 @@ chmod +x ~/bin/argo

echo "Run the sample tests..."

# Generate Python package
cd ${BASE_DIR}/sdk/python
./build.sh /tmp/kfp.tar.gz

# Install python client, including DSL compiler.
pip3 install /tmp/kfp.tar.gz

# Run the tests
if [ "$TEST_NAME" == 'tf-training' ]; then
SAMPLE_KUBEFLOW_TEST_RESULT=junit_SampleKubeflowOutput.xml
Expand Down

0 comments on commit f477a4f

Please sign in to comment.