Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Mesos REST API #60

Closed
kbokh opened this issue Mar 23, 2016 · 1 comment
Closed

Mesos REST API #60

kbokh opened this issue Mar 23, 2016 · 1 comment
Labels

Comments

@kbokh
Copy link

kbokh commented Mar 23, 2016

There is REST API for mesos slave nodes ( /v1.0/mesos/cli). Is there any howto about using this api with mesos? I am using a mesos cluster for cuda based ML trainings and developed some tricks to select GPU for dockerized training processes. Investigation of /v1.0/mesos/cli showed that the API provides configuration parameters for mesos slaves (attributes and resources) but it is not clear how it can be used with mesos frameworks (marathon, singularity) and nvidia-docker. I'd be grateful if someone could provide additional information about using nvidia-docker-plugin REST API with a mesos ecosystem.

@3XX0
Copy link
Member

3XX0 commented Mar 23, 2016

The /mesos/cli entrypoint generates mesos-slave arguments.
It is composed of a custom resource and a custom attribute named gpus:

--attributes=gpus:<GPU-INFO>
--resources=gpus:{<GPU-UUID>,<GPU-UUID>...}

Where <GPU-INFO> is the output of /gpu/info zlib compressed and encoded in base64 (RFC 6920), and <GPU-UUID> is the UUID of a given GPU as reported by /gpu/info

# Run mesos-slave with GPU resources
mesos-slave --master=localhost:5050 `curl -s localhost:3476/mesos/cli`

Note that it is the responsibility of the framework to understand and consume these resources.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants