Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use pipenv in image building dockerfile #36

Merged
merged 21 commits into from
Mar 28, 2018
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 37 additions & 33 deletions images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand All @@ -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
Expand All @@ -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/

Expand All @@ -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/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this get used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# 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
Expand Down
42 changes: 0 additions & 42 deletions images/requirements.txt

This file was deleted.

5 changes: 2 additions & 3 deletions py/kubeflow/testing/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import os
import re
import subprocess
import tempfile
import time
import urllib
import yaml
Expand All @@ -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.
"""
Expand All @@ -47,7 +46,7 @@ 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
# log_file = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just delete this line?


process = subprocess.Popen(
command, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
Expand Down