Skip to content

Commit 1c9cde5

Browse files
committed
[SPARK-49402][PYTHON][FOLLOW-UP] Manually load ~/.profile in Spark Connect notebook
### What changes were proposed in this pull request? This is a followup of apache#47883 that adds manual `source ~/.profile`. ### Why are the changes needed? Ever since we switched to `Dockerfile`, none of `./profile`, `/.bashrc`, `./bash_profile`, etc seems working. There are a couple of related issues in Jupyter but I cannot figure it out. This is the only cell it needs the environment variable so decided to simply work around. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manually tested. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#47902 from HyukjinKwon/SPARK-49402-followup. Authored-by: Hyukjin Kwon <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
1 parent 6d8235f commit 1c9cde5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/docs/source/getting_started/quickstart_connect.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"metadata": {},
2929
"outputs": [],
3030
"source": [
31-
"!$HOME/sbin/start-connect-server.sh"
31+
"%%bash\n",
32+
"source ~/.profile # Make sure environment variables are loaded.\n",
33+
"$HOME/sbin/start-connect-server.sh"
3234
]
3335
},
3436
{

0 commit comments

Comments
 (0)