-
Notifications
You must be signed in to change notification settings - Fork 280
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
[CLIPPER-154] Make a pip package #165
Conversation
Test FAILed. |
4598512
to
7a6f5e4
Compare
Test FAILed. |
setup.py
Outdated
url = 'https://github.com/ucbrise/clipper', | ||
packages = ['clipper_admin'], | ||
keywords = ['prediction', 'model', 'management'], | ||
install_requires = ['requests', 'pyparsing', 'appdirs', 'pprint', 'subprocess32', 'sklearn', 'numpy', 'scipy', 'fabric', 'conda', 'pyyaml'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My code formatting script is hanging for some reason -- figured it was best to push this change up early and figure out the formatting issue while it's getting reviewed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I can format it in a sec.
Okay just formatted the code |
Test FAILed. |
jenkins test this please |
1 similar comment
jenkins test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I need to do some testing, but here's a first round of comments.
@@ -3,7 +3,7 @@ FROM clipper/py-rpc:latest | |||
MAINTAINER Dan Crankshaw <dscrankshaw@gmail.com> | |||
|
|||
COPY python_container.py python_container_entry.sh /container/ | |||
COPY pywrencloudpickle.py python_container_conda_deps.txt /lib/ | |||
COPY ../../clipper_admin/pywrencloudpickle.py python_container_conda_deps.txt /lib/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work. All the paths copied into the container need to be in the directory tree whose root is the directory containing the Dockerfile (https://docs.docker.com/engine/reference/commandline/build/#build-with-path). This is also important to make sure that the automated builds on Docker hub work. Probably the easiest thing to do is to move all the container dockerfiles to the top level of the directory. You'll need to modify the paths in the Dockerfiles, as well as the script that builds all the files.
@@ -148,7 +148,7 @@ | |||
"# clipper_manager must be on your path:\n", | |||
"import sys\n", | |||
"import os\n", | |||
"sys.path.append(os.path.abspath('../../management/'))\n", | |||
"sys.path.append(os.path.abspath('../../clipper_admin/'))\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we should import the module directly like this or make them install the pip package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem cleaner to make them install the pip package, especially since the intended tutorial user is a Clipper user, not developer.
@@ -23,7 +23,7 @@ | |||
"# clipper_manager must be on your path:\n", | |||
"import sys\n", | |||
"import os\n", | |||
"sys.path.append(os.path.abspath('../../management/'))\n", | |||
"sys.path.append(os.path.abspath('../../clipper_admin/'))\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question about direct import vs make them install the pip package
setup.py
Outdated
setup( | ||
name='clipper_admin', | ||
version='0.1', | ||
description='A low latency online prediction serving system', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the description "Admin commands for the Clipper prediction-serving system."
setup.py
Outdated
version='0.1', | ||
description='A low latency online prediction serving system', | ||
author='Dan Crankshaw', | ||
author_email='dcrankshaw@berkeley.edu', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use crankshaw@cs.berkeley.edu
for my email
setup.py
Outdated
description='A low latency online prediction serving system', | ||
author='Dan Crankshaw', | ||
author_email='dcrankshaw@berkeley.edu', | ||
url='https://github.com/ucbrise/clipper', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the url http://clipper.ai
setup.py
Outdated
author_email='dcrankshaw@berkeley.edu', | ||
url='https://github.com/ucbrise/clipper', | ||
packages=['clipper_admin'], | ||
keywords=['prediction', 'model', 'management'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add clipper
as a keyword
Test FAILed. |
Test FAILed. |
77ca261
to
f55d05c
Compare
Test FAILed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update examples/tutorial/requirements.txt
to reflect the new set of Python dependencies that include the clipper-admin
package?
time docker build -t clipper/noop-container -f ../../NoopDockerfile ../../ | ||
time docker build -t clipper/python-container -f ../../PythonContainerDockerfile ../../ | ||
time docker build -t clipper/sklearn_cifar_container -f ../../SklearnCifarDockerfile ../../ | ||
time docker build -t clipper/tf_cifar_container -f ../../TensorFlowCifarDockerfile ../../ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's consolidate this script into bin/build_docker_images.sh
Test FAILed. |
Test PASSed. |
… consolidated container build scripts
Tested with |
Test PASSed. |
To test out the functionality of this PR:
Create accounts on TestPyPI and PyPI:
https://testpypi.python.org/pypi?%3Aaction=login_form
https://pypi.python.org/pypi?%3Aaction=login_form
Create a file ~/.pypirc with the following contents:
Because this file contains your credentials in plaintext, change its read/write permissions:
chmod 600 ~/.pypirc
Upload our pip package to PyPI Testing server:
python setup.py register -r testpypi
python setup.py sdist upload -r testpypi
Install from PyPi Testing server:
pip install -i https://testpypi.python.org/pypi clipper_admin
Give it a go:
Upload our pip package to real PyPi server:
python setup.py register -r pypi
python setup.py sdist upload -r pypi
Install from real PyPi server:
pip uninstall clipper_admin
(to get rid of the one from the testing server)pip install clipper_admin
https://clipper.atlassian.net/projects/CLIPPER/issues/CLIPPER-154