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

SDK - Fixed string comparisons #1756

Merged
merged 1 commit into from
Aug 17, 2019
Merged
Changes from all 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
6 changes: 3 additions & 3 deletions sdk/python/kfp/compiler/_component_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,18 @@ def _generate_dockerfile(filename, base_image, entrypoint_filename, python_versi
raise ValueError('python_version has to be either python2 or python3')
with open(filename, 'w') as f:
f.write('FROM ' + base_image + '\n')
if python_version is 'python3':
if python_version == 'python3':
f.write('RUN apt-get update -y && apt-get install --no-install-recommends -y -q python3 python3-pip python3-setuptools\n')
else:
f.write('RUN apt-get update -y && apt-get install --no-install-recommends -y -q python python-pip python-setuptools\n')
if requirement_filename is not None:
f.write('ADD ' + requirement_filename + ' /ml/requirements.txt\n')
if python_version is 'python3':
if python_version == 'python3':
f.write('RUN pip3 install -r /ml/requirements.txt\n')
else:
f.write('RUN pip install -r /ml/requirements.txt\n')
f.write('ADD ' + entrypoint_filename + ' /ml/main.py\n')
if python_version is 'python3':
if python_version == 'python3':
f.write('ENTRYPOINT ["python3", "-u", "/ml/main.py"]')
else:
f.write('ENTRYPOINT ["python", "-u", "/ml/main.py"]')
Expand Down