clipper icon indicating copy to clipboard operation
clipper copied to clipboard

Hanging Several hours :[clipper_admin.py:458] Pushing model Docker image to sum-mode2:1

Open xuguangzhao opened this issue 6 years ago • 1 comments

When I finish deploy in k8s cluster, and the clipper is running. so I attempt to deploy python sum funtion ,but when I exec : python_deployer.deploy_python_closure(clipper_conn, name="sum-model", version=1, input_type="doubles", func=feature_sum) , bog down few hours:

In [6]: python_deployer.deploy_python_closure(clipper_conn, name="sum-mode2", version=1, input_type="doubles", func=feature_sum) 18-07-09:06:41:45 INFO [deployer_utils.py:44] Saving function to /tmp/clipper/tmpH2jS6p 18-07-09:06:41:45 INFO [deployer_utils.py:54] Serialized and supplied predict function 18-07-09:06:41:45 INFO [python.py:192] Python closure saved 18-07-09:06:41:45 INFO [python.py:198] Using Python 2 base image 18-07-09:06:41:45 INFO [clipper_admin.py:452] Building model Docker image with model data from /tmp/clipper/tmpH2jS6p 18-07-09:06:41:48 INFO [clipper_admin.py:456] {u'stream': u'Step 1/2 : FROM clipper/python-closure-container:0.3.0\n'} 18-07-09:06:41:48 INFO [clipper_admin.py:456] {u'stream': u' ---> bfcdf8ffce0c\n'} 18-07-09:06:41:48 INFO [clipper_admin.py:456] {u'stream': u'Step 2/2 : COPY /tmp/clipper/tmpH2jS6p /model/\n'} 18-07-09:06:41:48 INFO [clipper_admin.py:456] {u'stream': u' ---> 71d9dfa3c234\n'} 18-07-09:06:41:48 INFO [clipper_admin.py:456] {u'stream': u'Successfully built 71d9dfa3c234\n'} 18-07-09:06:41:48 INFO [clipper_admin.py:458] Pushing model Docker image to sum-mode2:1

the state is hanging for several hours.

When I exec bash shell :kubectl get pods -o wide [root@zhiyuan1 kubernetes]# kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE sum-model-1-deployment-at-0-96c46b64d-czh46 0/1 ImagePullBackOff 0 6h 10.244.2.17 zhiyuan-3

image

xuguangzhao avatar Jul 09 '18 08:07 xuguangzhao

ImagePullBackOff error is usually due to the image minikube is not authorized to pull that image.

Here are steps to resolve this:

  • If you are using minikube, you can just have minikube to use the local docker context. See more here
  • Else, you can change the following line:
python_deployer.deploy_python_closure(
    clipper_conn, 
    name="sum-mode2", 
    version=1, 
    input_type="doubles", 
    func=feature_sum)

into

python_deployer.deploy_python_closure(
    clipper_conn, 
    name="sum-mode2", 
    version=1, 
    input_type="doubles", 
    func=feature_sum,
    registry=<YOUR REGISTRY HERE>)

You can put your docker account name in the registry keyword argument. So Clipper will tag the image with your docker account name push to the correct place such that kubernetes will have access to pull it.

simon-mo avatar Jul 09 '18 21:07 simon-mo