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

embedded_py option #10

Closed
youssefqarri opened this issue May 3, 2023 · 4 comments
Closed

embedded_py option #10

youssefqarri opened this issue May 3, 2023 · 4 comments
Assignees

Comments

@youssefqarri
Copy link

Hello,

I think it would be good to give the option to run the MonetDB with embedded_py

Cheers

@kutsurak kutsurak self-assigned this May 8, 2023
@kutsurak
Copy link
Contributor

kutsurak commented May 8, 2023

Hi,

Currently there are two ways to do this for each database individually but not for the database farm itself:

For the first way you need to set a daemon password when you create the image. Something like:
docker run -d -p 50000:50000 --name monetdb -e "MDB_DAEMON_PASS=daemonpass" -e "MDB_DB_ADMIN_PASS=adminpass" monetdb/monetdb

This will create the default database monetdb as specified in the readme.

Then from the host you can run
monetdb -h localhost -P daemonpass set embedpy3=yes monetdb
and this will enable the python integration for the database monetdb.

Alternatively, you can access the shell inside the container, after you start it, using
docker exec monetdb bash and use monetdb -h localhost set embedpy3=yes monetdb there. This is relevant if you do not have the monetdb suite of tool installed in the host.

Now, by testing all this when writing this comment, I realized that numpy is missing from the image, so the databases cannot start with embedded python. This will be corrected, but in the meantime I suggest that you use the second way and install numpy with the command dnf install python3-numpy from the shell in the container before starting the database. This worked for me, but if you have any issues let me know.

@youssefqarri
Copy link
Author

Hello,

Thank you for your reply. This is indeed the normal way to do it, however, in Docker, it should be in the entry point.

I managed to run the database farm by editing the last line of "scripts/entrypoint.sh" by running it using "mserver5" command, and adding "dnf install python3-numpy" in Dockerfile.

Maybe you could add an option in the run of the container to allow the user to activate embedpy3.

Thank you for your great work.

Regards

@kutsurak
Copy link
Contributor

kutsurak commented May 8, 2023

Maybe you could add an option in the run of the container to allow the user to activate embedpy3.

Yes I agree. I am thinking that we should probably add another environment variable that sets database farm options and/or database options.

Thank you for the feedback!

@kutsurak kutsurak mentioned this issue May 15, 2023
2 tasks
@kutsurak
Copy link
Contributor

Small update on this: the rpm should now pull the numpy package when it gets installed: MonetDB/MonetDB@8a27b36

This will take effect in the next bugfix release. In the meantime I will change the Dockerfile so that it explicitly installs python3-numpy.

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

No branches or pull requests

2 participants