in Datalore is there a way to add the `--add-opens...
# datascience
d
in Datalore is there a way to add the
--add-opens=java.base/java.nio=ALL-UNNAMED
for Arrow support?
a
There is an instruction in the notebook to add jvm args, but I always forget how it is done...
d
like a Kotlin demo notebook? I have been looking through the documentation but might have missed the example notebook that had it
a
I am trying to find it. For some reason it is undocummented.
Ah, sorry, it works only on kotlin compiler options, not on JVM args. You need https://github.com/Kotlin/kotlin-jupyter#creating-kernels to pass JVM args
d
thanks. I was looking at that a bit. Is the default kernel in DataLore known/discoverable? To make it as similar as possible. I guess I can create a new one from the terminal but not sure how to activate it. I think I saw something about
init.sh
last night. Need to find that again
maybe I should try to see if
KOTLIN_JUPYTER_JAVA_OPTS
or
KOTLIN_JUPYTER_JAVA_OPTS_EXTRA
work as secrets on the default kernel
a
Probably not. You have access to the terminal so you can proably change configuraion manually through terminal...
i
Hi! You need to add KERNEL_JAVA_OPTS environment variable with the value
--add-opens=java.base/java.nio=ALL-UNNAMED
to your environment https://github.com/Kotlin/kotlin-jupyter/blob/master/distrib/run_kotlin_kernel/run_kernel.py#L68
There was init.sh but it doesn't work now
You will probably need to stop and restart machine, not just restart notebook
d
I got it working with
KOTLIN_JUPYTER_JAVA_OPTS_EXTRA
. I restarted the machine and verified the
KERNEL_JAVA_OPTS
was in the /proc/{pid}/environ for both the java kernel process and its parent but it didn't modify the java command. I tried these first,
KERNEL_JAVA_OPTS
,
KERNEL_EXTRA_JAVA_OPTS
,
KOTLIN_JUPYTER_JAVA_OPTS
(this one is overwritten) But this one works
KOTLIN_JUPYTER_JAVA_OPTS_EXTRA
a
@Ilya Muradyan I think it is worth mentioning this problem to DataLore team. Each notebook has an
environment
file. Maybe jvm keys should go there.
i
I asked them explicitly, they say it's the only way for now