cwpearson / azure-pipelines-agent

Self-hosted GPU agent for Azure Piplines with Docker
7 stars 3 forks source link

`python manager.py ...` exits with 404 #5

Open cwpearson opened 5 years ago

cwpearson commented 5 years ago
python manager.py [redacted]] https://dev.azure.com/c3srdev amd64-ubuntu1604-cuda100 --volume ~/graph/:/data/graph:PANGOLIN_GRAPH_DIR
testing for nvidia-docker
nvidia-docker looks good
autodetected docker image cwpearson/azp-cuda-agent:amd64-ubuntu1604-cuda102
pulling cwpearson/azp-cuda-agent:amd64-ubuntu1604-cuda102
Traceback (most recent call last):
  File "/home/pearson/.local/share/virtualenvs/azure-pipelines-agent-fYRwYNLf/lib/python3.6/site-packages/docker/api/client.py", line 261, in _raise_for_status
    response.raise_for_status()
  File "/home/pearson/.local/share/virtualenvs/azure-pipelines-agent-fYRwYNLf/lib/python3.6/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localhost/v1.35/images/create?tag=amd64-ubuntu1604-cuda102&fromImage=cwpearson%2Fazp-cuda-agent

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manager.py", line 147, in <module>
    client.images.pull(DOCKER_IMAGE)
  File "/home/pearson/.local/share/virtualenvs/azure-pipelines-agent-fYRwYNLf/lib/python3.6/site-packages/docker/models/images.py", line 444, in pull
    repository, tag=tag, stream=True, **kwargs
  File "/home/pearson/.local/share/virtualenvs/azure-pipelines-agent-fYRwYNLf/lib/python3.6/site-packages/docker/api/image.py", line 414, in pull
    self._raise_for_status(response)
  File "/home/pearson/.local/share/virtualenvs/azure-pipelines-agent-fYRwYNLf/lib/python3.6/site-packages/docker/api/client.py", line 263, in _raise_for_status
    raise create_api_error_from_http_exception(e)
  File "/home/pearson/.local/share/virtualenvs/azure-pipelines-agent-fYRwYNLf/lib/python3.6/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
    raise cls(e, response=response, explanation=explanation)
docker.errors.NotFound: 404 Client Error: Not Found ("manifest for cwpearson/azp-cuda-agent:amd64-ubuntu1604-cuda102 not found")
$ docker version
Client: Docker Engine - Community
 Version:           19.03.1
 API version:       1.39 (downgraded from 1.40)
 Go version:        go1.12.5
 Git commit:        74b1e89
 Built:             Thu Jul 25 21:21:05 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.8
  Git commit:       2d0083d
  Built:            Thu Jun 27 17:23:02 2019
  OS/Arch:          linux/amd64
  Experimental:     false
cwpearson commented 5 years ago

This could be because the docker API version on the host (1.39) doesn't match the docker python library version (1.35?)