Passing environment variables to the servers
I'm running Linux on a laptop with Optimus technology, where I'm using Intel card for rendering, and NVIDIA card for CUDA. I was able to have OmniSci running fine through:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia_icd.json $OMNISCI_PATH/startomnisci
But I'd like now to run it "regularly", through omnisci_server
and omnisci_web_server
systemd services, and my question is how to pass these environment variables to these servers? I can edit corresponding systemd service files, and add them, but I'm wondering is there maybe a config file for servers to add these, and if not then which of the two servers actually needs this?
Also, somewhat related: the installation guide mentions exporting OMNISCI_USER
and friends from $HOME/.bashrc
. What are these variables used for, are these just for running omni_sql
, or also for something else?
Thanks.
-
Hi @CGorac,
Welcome to our community; we hope you will enjoy it.
We haven't any script that's doing the job right now, so you have to edit the database server's configuration file manually.
We have a guide here on how to add the environment in case of trouble starting the server https://docs-new.omnisci.com/troubleshooting/vulkan-graphics-api-beta#troubleshooting
I wrote that section of the docs, and probably, I should be clearer about the service that needs the configuration change; I am sorry about that.
The variables are used from the initialization of systemd, so utilities like omnisql should ignore them.
Are you sure you are using the Intel GPU for rendering od the mapd with MAPD? I guess to do that you should start the server with the render-prefere-igpu parameter turned on.
The parameter is in beta so I'm not sure how is working, but I guess that is going to be slower than using the same GPU to execute the queries and render the data.
Anyway I hope to hear from you soon, so Best Regards.
Candido.
-
Thanks for your reply. Indeed I've edited
omnisci_server
service configuration file to add:[Service] Environment="OMNISCI_USER=omnisci" Environment="OMNISCI_GROUP=omnisci" Environment="OMNISCI_STORAGE=/var/lib/omnisci" Environment="OMNISCI_PATH=/opt/omnisci" Environment="OMNISCI_LOG=/var/lib/omnisci/data/mapd_log" Environment="__NV_PRIME_RENDER_OFFLOAD=1" Environment="__GLX_VENDOR_LIBRARY_NAME=nvidia" Environment="VK_ICD_FILENAMES=/etc/vulkan/icd.d/nvidia_icd.json"
and now it works fine.
As far as GPU to be used for OmniSci rendering concerned, here I do want to use NVIDIA GPU for this (it's logical to use it as the database itself is handled by the same GPU), so it gets activated by the latest three env. variables set.
Thanks.
Please sign in to leave a comment.
Comments
2 comments