Code Monkey home page Code Monkey logo

mindsdb-docker-extension's Introduction

MindsDB Docker Desktop Extension

image

This is the Docker Desktop Extension for MindsDB. It allows you to use MindsDB within Docker Desktop.

Local Development

The extension is built using the Docker Desktop Extension SDK. To build and install the extension locally, you need to have Docker Desktop installed.

The following commands can be used to get the extension running locally.

To build the extension, use make build-extension or:

  docker buildx build -t mindsdb/mindsdb-docker-extension:latest . --load

To install the extension, use make install-extension or:

  docker extension install mindsdb/mindsdb-docker-extension:latest

If you want to automate this command, use the -f or --force flag to accept the warning message.

To preview the extension in Docker Desktop, open Docker Dashboard once the installation is complete. The left-hand menu displays a new tab with the name of your extension. You can also use docker extension ls to see that the extension has been installed successfully.

Frontend Development

During the development of the frontend for the extension, it's helpful to use hot reloading to test changes without rebuilding the entire extension. To do this, Docker Desktop can be configured to use a local development server as the source for the frontend.

To start the development server, run the following commands:

  cd ui
  npm install
  npm run build:css
  npm run dev

This starts a development server that listens on port 3000.

Docker Desktop can now be configured to use this as the frontend source. In another terminal run:

  docker extension dev ui-source mindsdb/mindsdb-docker-extension:latest http://localhost:3000

In order to open the Chrome Dev Tools for the extension when the extension tab is clicked, run:

  docker extension dev debug mindsdb/mindsdb-docker-extension:latest

Each subsequent click on the extension tab will also open Chrome Dev Tools. To stop this behaviour, run:

  docker extension dev reset mindsdb/mindsdb-docker-extension:latest

Note: This extension does not consist of a backend, rather it brings up the latest MindsDB container, which the front-end interacts with.

Clean up

To remove the extension:

docker extension rm mindsdb/mindsdb-docker-extension:latest

mindsdb-docker-extension's People

Contributors

minurapunchihewa avatar ajeetraina avatar collabnix avatar zoranpandovski avatar torrmal avatar

Watchers

 avatar

Forkers

hawthorne001

mindsdb-docker-extension's Issues

The Extension Binds the Ports Used by MindsDB

When the extension is running on Docker Desktop, the ports that are used by MindsDB (specifically 47334 and 47335), are bound on the host machine. The reason for this is the fact that the extension runs the MindsDB container under-the-hood. Binding these ports make it unfeasible to run MindsDB via another means, locally (through Docker, PIP or from source code).

This may not cause many problems for users as they will probably only try a single method of running MindsDB, but it might hinder development unless users are aware of this. It might also be a problem for someone who is exploring the various methods available for running MindsDB.

Another minor, but connected issue here is that the extension also binds port 8080 incorrectly. There is no requirement for this to use MindsDB and should be fixed.

Use Meaningful Service Name

The name of the MindsDB container that runs as a service is called 'service', which is slightly misleading. It might be a better idea to use a more meaningful service name in case some users want to view the logs or perform any other actions.

image

Allow MindsDB Image to be Pushed to AWS/GCP Directly via the Extension

Once a user is done experimenting with MindsDB via the extension on Docker Desktop, allow them to push the image directly to a container registry on AWS/GCP. This image should include the dependencies that were installed while running the extension.

A few questions yet to be answered,

  • Should the image be pushed to an image registry or a container orchestration service?
  • Should the image that is pushed include the volumes that were bound when running on Docker Desktop?

Clean Extension Code

Clean the code (and project structure) by removing unwanted files, moving images and other assets to a new directory etc.

Auto-update MindsDB Container When New Image is Released

At the moment, since the extension is using Docker Compose to bring up the containers, if the MindsDB image (mindsdb/mindsdb:latest) has already been pulled by the user (or if the extension was installed) and a new version of the image is released subsequently, the extension will continue to use the old version of the image. This is the default behavior of Docker Compose.

Ideally, each time a new version of the MindsDB image (latest tag) is released, the extension should begin using it. However, one slight issue that arises in doing so is the fact that, because Docker Compose will spin up a brand new container with the new version of the image that is pulled, any changes that were made to the previous container will be lost. This applies mostly to the dependencies that are installed for integrations by the user; these will be lost as a result of the update.

Therefore, while the image is auto-updated, it is also necessary to persist the dependencies that were installed by the user across new versions.

Issue with the sidebar button

I was just testing the Extension and found that few of the sidebar buttons on the sidebar are displaying error messages.
Can you have a look? Say, if I click "jobs_history" or "web" on the left sidebar, then it displays error message as shown in the figure.

Screenshot 2024-03-05 at 5 49 19 PM

MindsDB Extension Issue in Docker Desktop

Hi, Mi name is Manuel and I can't install MindsDB extension in Docker Desktop, the following error appear:
Extension was not installed. Reason: installation could not be completed due to: executing 'C:\Program Files\Docker\Docker\resources\bin\docker --context desktop-linux cp 8aeb2970c5ee5c3c97bc59c08f5900e49dd928fc30c0823b44e245305e7e5006:/ui C:\Users\Manuel Alejandro\AppData\Roaming\Docker\extensions\tmp\2900217164-ext-install\mindsdb_mindsdb-docker-extension\ui' : exit status 1: symlink ..\browserslist\cli.js C:\Users\Manuel Alejandro\AppData\Roaming\Docker\extensions\tmp\2900217164-ext-install\mindsdb_mindsdb-docker-extension\ui\ui\node_modules.bin\browserslist: A required privilege is not held by the client.

I only have this C:\Users\Manuel Alejandro\AppData\Roaming\Docker\extensions\tmp. After this we don't have 2900217164-ext-install\mindsdb_mindsdb-docker-extension\ui

Can you find the issue why I can't install MindsDB in Docker Desktop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.