-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
updated docker docs #8938
Conversation
There was a problem hiding this 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). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
docs/setup/self-hosted/docker.mdx
Outdated
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. |
There was a problem hiding this comment.
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,
- Use the
--name
flag with thedocker run
command to get MindsDB running initially:docker run --name mindssdb -p 47334:47334 -p 47335:47335 mindsdb/mindsdb
- 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. - 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. Thanks.
docs/setup/self-hosted/docker.mdx
Outdated
|
||
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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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,
- Some of our users might already be accustomed to this method.
- Certain advanced users might actually prefer it (unlikely).
docs/setup/self-hosted/docker.mdx
Outdated
Restart the container: | ||
|
||
```bash | ||
docker restart container-name |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
.
docs/setup/self-hosted/docker.mdx
Outdated
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
docs/setup/self-hosted/docker.mdx
Outdated
|
||
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> |
There was a problem hiding this comment.
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,
- Some of our users might already be accustomed to this method.
- Certain advanced users might actually prefer it (unlikely).
docs/setup/self-hosted/docker.mdx
Outdated
|
||
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*. |
There was a problem hiding this comment.
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*. |
There was a problem hiding this comment.
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.
There was a problem hiding this 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,
- For the screenshot of the extension of the extension; can we please use this?
- 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,
@MinuraPunchihewa |
There was a problem hiding this 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.
Description
updated docker desktop docs
Fixes #8956
Type of change