diff --git a/images/Dockerfile b/images/Dockerfile index 3ace0ced7..339d4b6de 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -4,40 +4,41 @@ FROM ubuntu:xenial MAINTAINER Jeremy Lewi # Never prompt the user for choices on installation/configuration of packages -ENV DEBIAN_FRONTEND noninteractive -ENV TERM linux +ENV DEBIAN_FRONTEND=noninteractive +ENV TERM=linux +ENV LC_ALL=C.UTF-8 +ENV LANG=C.UTF-8 # gcc & python-dev are needed so we can install crcmod for gsutil # also includes installations for Python3 RUN set -ex \ && apt-get update -yqq \ && apt-get install -yqq --no-install-recommends \ - build-essential \ - curl \ - locales \ - wget \ - ca-certificates \ - git \ - zip \ - unzip \ - gcc \ - ssh \ - python-dev \ - python-setuptools \ - python-pip \ - python3-dev \ - python3-setuptools \ - python3-pip \ + build-essential \ + curl \ + locales \ + wget \ + ca-certificates \ + git \ + zip \ + unzip \ + gcc \ + python-dev \ + python-setuptools \ + python-pip \ + python3-dev \ + python3-setuptools \ + python3-pip \ && python -V \ && python3 -V \ && apt-get clean \ && rm -rf \ - /var/lib/apt/lists/* \ - /tmp/* \ - /var/tmp/* \ - /usr/share/man \ - /usr/share/doc \ - /usr/share/doc-base + /var/lib/apt/lists/* \ + /tmp/* \ + /var/tmp/* \ + /usr/share/man \ + /usr/share/doc \ + /usr/share/doc-base # Install go RUN cd /tmp && \ @@ -52,10 +53,10 @@ RUN wget -q https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.ta tar xzf google-cloud-sdk.tar.gz -C / && \ rm google-cloud-sdk.tar.gz && \ /google-cloud-sdk/install.sh \ - --disable-installation-options \ - --bash-completion=false \ - --path-update=false \ - --usage-reporting=false && \ + --disable-installation-options \ + --bash-completion=false \ + --path-update=false \ + --usage-reporting=false && \ gcloud components install alpha beta kubectl # Install Helm @@ -82,7 +83,7 @@ RUN curl -sS http://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ # Install glide RUN cd /tmp && \ wget -O glide-v0.13.0-linux-amd64.tar.gz \ - https://github.com/Masterminds/glide/releases/download/v0.13.0/glide-v0.13.0-linux-amd64.tar.gz && \ + https://github.com/Masterminds/glide/releases/download/v0.13.0/glide-v0.13.0-linux-amd64.tar.gz && \ tar -xvf glide-v0.13.0-linux-amd64.tar.gz && \ mv ./linux-amd64/glide /usr/local/bin/ @@ -103,13 +104,16 @@ RUN cd /tmp && \ rm -rf /tmp/v0.9.5.tar.gz && \ rm -rf /tmp/jsonnet-0.9.5 -COPY ./requirements.txt /tmp/requirements.txt +COPY ./Pipfile ./Pipfile.lock /tmp/ # Install various python libraries for both Python 2 and 3 (for now) -RUN pip install -U pip wheel && \ - pip install -r /tmp/requirements.txt && \ +RUN cd /tmp/ && \ + pip install -U pip wheel && \ + pip install pipenv && \ + pipenv install --system --two && \ pip3 install -U pip wheel && \ - pip3 install -r /tmp/requirements.txt + pip3 install pipenv && \ + pipenv install --system --three COPY checkout.sh /usr/local/bin RUN chmod a+x /usr/local/bin/checkout.sh diff --git a/images/requirements.txt b/images/requirements.txt deleted file mode 100644 index 756befb3d..000000000 --- a/images/requirements.txt +++ /dev/null @@ -1,42 +0,0 @@ -astroid==1.6.1 -cachetools==2.0.1 -certifi==2018.1.18 -chardet==3.0.4 -crcmod==1.7 -google-api-core==0.1.4 -google-api-python-client==1.6.5 -google-auth==1.4.0 -google-auth-httplib2==0.0.3 -google-cloud-core==0.28.0 -google-cloud-storage==1.7.0 -google-resumable-media==0.3.1 -googleapis-common-protos==1.5.3 -httplib2==0.10.3 -idna==2.6 -ipaddress==1.0.19 -isort==4.3.3 -jinja2==2.10 -kubernetes==4.0.0 -lazy-object-proxy==1.3.1 -markupsafe==1.0 -mccabe==0.6.1 -mock==2.0.0 -oauth2client==4.1.2 -oauthlib==2.0.6 -pbr==3.1.1 -protobuf==3.5.1 -pyasn1==0.4.2 -pyasn1-modules==0.2.1 -pylint==1.8.2 -python-dateutil==2.6.1 -pytz==2017.3 -pyyaml==3.12 -requests==2.18.4 -requests-oauthlib==0.8.0 -retrying==1.3.3 -rsa==3.4.2 -six==1.11.0 -uritemplate==3.0.0 -urllib3==1.22 -websocket-client==0.40.0 -wrapt==1.10.11 diff --git a/py/kubeflow/testing/util.py b/py/kubeflow/testing/util.py index 5c3859e92..ebb39f82e 100755 --- a/py/kubeflow/testing/util.py +++ b/py/kubeflow/testing/util.py @@ -6,7 +6,6 @@ import os import re import subprocess -import tempfile import time import urllib import yaml @@ -31,7 +30,7 @@ def run(command, cwd=None, env=None, polling_interval=datetime.timedelta(seconds """Run a subprocess. Any subprocess output is emitted through the logging modules. - + Returns: output: A string containing the output. """ @@ -47,8 +46,6 @@ def run(command, cwd=None, env=None, polling_interval=datetime.timedelta(seconds lines.append("{0}={1}".format(k, env[k])) logging.info("Running: Environment:\n%s", "\n".join(lines)) - log_file = None - process = subprocess.Popen( command, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)