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

neuro image ls requires Docker on a user machine #1071

Closed
mariyadavydova opened this issue Sep 24, 2019 · 18 comments · Fixed by #1186
Closed

neuro image ls requires Docker on a user machine #1071

mariyadavydova opened this issue Sep 24, 2019 · 18 comments · Fixed by #1186

Comments

@mariyadavydova
Copy link
Contributor

We are working on hiding Docker details from the user (e.g. providing base images), so from the UX point of view it is quite an unexpected behavior.

@dalazx
Copy link
Contributor

dalazx commented Sep 24, 2019

we are not hiding Docker details in neuro, are we?

@mariyadavydova
Copy link
Contributor Author

We want our users be able to work with a platform without having to deal with Docker anyhow.

Getting a list of available environments seems to be a simple and straightforward operation (from the user perspective). For example, one may want to check that a new image was created during 'neuro job save'. Or one may want to checkout the list of environments their college shared with them.

And all of a sudden this user needs Docker installed on a local machine. This is just very unexpected.

@dalazx
Copy link
Contributor

dalazx commented Sep 24, 2019

Docker is inevitable for now. what you are talking about is not a neuro concern, but rather a project template concern.

@dalazx
Copy link
Contributor

dalazx commented Sep 24, 2019

So I think this issue should be moved to the appropriate repo.

@mariyadavydova
Copy link
Contributor Author

AFAIU, this problem can only be fixed on the client side. I don't get how the template can help one to get a list of available images without Docker. If you have any idea, please, share.

@dalazx
Copy link
Contributor

dalazx commented Sep 24, 2019

sorry, but I am not convinced that there's a problem really.
at the moment neuro does require a docker engine API available and configured, in part for neuro image push/pull.
neuro image save/ls should not depend though.

@asvetlov
Copy link
Contributor

Now there is a simple rule: neuro image subsystem requires docker installed (not very hard to satisfy since neuro started to work with Docker on Windows).
This was a reason for the implemented behavior.

@mariyadavydova
Copy link
Contributor Author

@asvetlov I understand that there was a technical reason. However, this issue is about usability problem. A user shouldn't care about are technical details.

@asvetlov
Copy link
Contributor

asvetlov commented Sep 26, 2019

It is exactly the usability reason if you want to stress bold.
There is no technical limitation but the explanation of the implemented choice.

If you insist that only a subset of docker image commands requires a docker installed -- I'm ok with it but please explain your position.
Why we cannot require Docker client installed on users system? Is it that hard?

@mariyadavydova
Copy link
Contributor Author

AFAIU, it is not possible to install Docker client automatically when installing a neuro client (please correct me if I'm wrong). If so, this means that a user has to spend some time and effort to install it manually, which may be confusing and annoying.

Let me describe a use-case: I got this issue from one of our ML engineers, who did the following:

  • Created a project from a template.
  • Filled it in with code and stuff.
  • Run make setup and had the shell disconnected from neuro job save due to whatever reason.
  • Run neuro image ls to check if the project-related image was successfully saved (it should be clear because the project-related images have specific names) - and failed to do that because of lack of the Docker client on his laptop.

Now, this scenario may seem too specific, because our customers using the template may be unaware of the fact that neuro image ls command may help to understand if the remote environment was set up successfully or not. I can't confidently answer this question unless we have more active customers.

So, I suggest tagging this issue as have a minor severity and keeping it for a while, until we have more real-life use-cases.

@dalazx
Copy link
Contributor

dalazx commented Sep 26, 2019

same with Python, right? clearly if there are issues with the current approach, the easiest thing we can do now is to communicate it. @mariyadavydova please address this.

@shagren
Copy link
Contributor

shagren commented Nov 15, 2019

neuro image ls does not require any docker installed.

neuro image push/pull required docker. But these commands by design push/pull images to local docker registry and require docker engine available.

@mariyadavydova
Copy link
Contributor Author

@shagren If I run neuro image ls without docker, I get the following:

⇒ neuro image ls
ERROR: Docker API error: Docker engine is not available. Please specify DOCKER_HOST variable if you are using remote docker engine

@asvetlov
Copy link
Contributor

Currently that's true.
I still don't understand what prevents you to install docker locally?

@shagren
Copy link
Contributor

shagren commented Nov 20, 2019

@asvetlov like as it is our fail, in fact ls not require docker. I will check how to avoid this message

@asvetlov
Copy link
Contributor

I'm trying to figure out where did the requirement comes from?
The docker installation is easy than neuro install from my understanding.

@mariyadavydova
Copy link
Contributor Author

I consider the experience of a new user, who is working with our template or recipes.

  • There is a chance that they don't have docker installed on their local machine (quite probable).
  • These is also a chance that they will want to take a look at available environments via neuro image ls (less probable, yet possible).

After that a user gets an unexpected error.

I don't say that it is not possible to install Docker. But in this scenario which we promote as recommended way to start working with Neuro, there is no explicit appearance of Docker images, so having this requirement is, again, highly unexpected.

@asvetlov Is it correct that one can't enforce a system dependency from within a Python package? I.e. we can't automatically install Docker on a local machine while installing neuro?

@shagren
Copy link
Contributor

shagren commented Nov 20, 2019

It's come from next line: https://github.com/neuromation/platform-client-python/blob/ded65f1cbbcd7f71ce417494b002abf3a2359fd3/neuromation/api/images.py#L33

And why: #385 (comment) (as I remember you asked me to remove lazy property)

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

Successfully merging a pull request may close this issue.

5 participants