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

updated docker docs #8938

Merged
merged 5 commits into from
Mar 22, 2024
Merged

updated docker docs #8938

merged 5 commits into from
Mar 22, 2024

Conversation

martyna-mindsdb
Copy link
Contributor

@martyna-mindsdb martyna-mindsdb commented Mar 18, 2024

Description

updated docker desktop docs

Fixes #8956

Type of change

  • 📄 This change is a documentation update

Copy link
Contributor

@MinuraPunchihewa MinuraPunchihewa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martyna-mindsdb Do you think it will be useful for us to include some information on how extension can be installed on Docker Desktop?
E.g. Go to the Extensions page (marketplace) -> Search for MindsDB -> Install the extension etc.?


This setup of MindsDB uses one of the available Docker images, as [listed here](/setup/self-hosted/docker).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extension actually always uses mindsdb/mindsdb:latest. Do you think this information needs to be pointed out to them, Martyna? Since this is meant to be a way for a user (even a non-technical user) to easily start using MindsDB, maybe it is not necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Minura. I corrected it.

Alternatively, if you run this command with the `detach` flag, it will return the container ID and not follow the logs:
Where:

- `docker run` is a native Docker command used to start a container.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Martyna, I think we should encourage the use of the --name flag and the docker start and docker stop commands here.

Basically, when the docker run command is used, if the image specified is not available in the host machine, it will be pulled and that image will be used to spin up a container. Now, each time this command is run, a new container is brought up using that particular image. Therefore, say a user was to run a container using docker run today and then do the same tomorrow; these will be entirely different containers. As a result, any changes that were made to the container that was spun up today, for instance, any dependencies that were installed, would be lost.

I think the best way to go about this is as follows,

  1. Use the --name flag with the docker run command to get MindsDB running initially: docker run --name mindssdb -p 47334:47334 -p 47335:47335 mindsdb/mindsdb
  2. Use the docker stop command with the given name to stop the container: docker stop mindsdb (it is not always necessary to do this because when you turn off the host machine, the container will also be shut down.
  3. Use the docker start command with the given name to start the container back up: docker start mindsdb.

I think this is important, mainly for the purpose of preserving any dependencies that are installed, but I also believe these are Docker best practices.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. Thanks.


MindsDB integrates with numerous data sources and AI frameworks. To use any of the integrations, you should enure that the required dependencies are installed in the Docker container.

Here is how to install the dependencies in the Docker container:
<Info>
Copy link
Contributor

@MinuraPunchihewa MinuraPunchihewa Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the 'Manage Integrations' page be pointed out as the main method for installing dependencies? And should the other methods (via the editor and the Add 'Datasource' page) be included as well?
I wonder if we should include a separate doc page for this (installing dependencies for integrations) and link it both here and above in the Docker Desktop page?
@ZoranPandovski What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing dependencies is part of the setup - therefore, I'd keep it here.

As of now, I mentioned about the 'Manage Integrations' page as the main method, as other methods blend in the flow. But if you think, we can mention it as well.

Btw. Do you think we should get rid of the method presented below that requires a container to be restarted? Or just keep it as an alternative.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense. Since the other methods are part of the flow, let's not mention it here.

I think it might be best to keep it as an alternative for two reasons,

  1. Some of our users might already be accustomed to this method.
  2. Certain advanced users might actually prefer it (unlikely).

Restart the container:

```bash
docker restart container-name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are going to include this, do you think it will be important to point out how the name of the container can be found? If the name is not specified in the docker run command, Docker automatically assigns a random name to the container, therefore, users will need to run a docker ps command to find out what the name assigned to their container is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modified docker run and added info about docker ps.

@martyna-mindsdb martyna-mindsdb changed the title updated docker desktop docs updated docker docs Mar 19, 2024
Once the container is created, you can use the following commands:

- `docker stop mindsdb_container` to stop the container. Note that this may not always be necessary because when turning off the host machine, the container will also be shut down.
- `docker start mindsdb_container` to start the container back up.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be important to mention here that this command is used to restart a stopped container with all its previous changes (such as any dependencies that are installed) intact.
I am not sure if it is necessary to mention that using the above docker run again when the previous container is stopped will start an entirely new container. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I added more explanation to distinguish between docker start and docker run.


MindsDB integrates with numerous data sources and AI frameworks. To use any of the integrations, you should enure that the required dependencies are installed in the Docker container.

Here is how to install the dependencies in the Docker container:
<Info>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense. Since the other methods are part of the flow, let's not mention it here.

I think it might be best to keep it as an alternative for two reasons,

  1. Some of our users might already be accustomed to this method.
  2. Certain advanced users might actually prefer it (unlikely).


MindsDB integrates with numerous data sources and AI frameworks. To use any of the integrations, you should enure that the required dependencies are installed in the Docker container.

Here is how to install the dependencies in the Docker container:
<Info>
Alternative way is to install dependencies directly from MindsDB editor. Go to *Settings* and *Manage Integrations*, select integrations you want to use and click on *Install*.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still says 'Alternative way'; should we change this section a little?


Select integrations you want to use and click on *Install*.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we maybe add a picture of the page here (and maybe down in the Docker doc) too? Just wondering, not mandatory.

Copy link
Contributor

@MinuraPunchihewa MinuraPunchihewa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martyna-mindsdb Thank you, this is really great. I just have a couple more comments about the images that we have used here,

  1. For the screenshot of the extension of the extension; can we please use this?
  2. In the screenshot of the 'Manage Integrations' page; the table does not seem centered. Is that how it appears to you? Mine seems to be centered,

image

@martyna-mindsdb
Copy link
Contributor Author

@MinuraPunchihewa
Thanks. I updated this image. As for the Manage Integratons image, I cropped it - now I updated it as well.

Copy link
Contributor

@MinuraPunchihewa MinuraPunchihewa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @martyna-mindsdb! I believe we are good to go.
Thank you so much for all your effort.

@MinuraPunchihewa MinuraPunchihewa merged commit e15ac1f into staging Mar 22, 2024
13 checks passed
@StpMax StpMax mentioned this pull request Mar 26, 2024
@hamishfagg hamishfagg deleted the docker-ext-docs branch June 10, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation needs to be added or changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs]: Add Revamped Documentation for Docker and Docker Desktop
2 participants