-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(add rlang #9): install R and R kernel for jupyter, just like …
…[r-notebook] docker image
- Loading branch information
1 parent
315a19d
commit 4f8ed2d
Showing
2 changed files
with
92 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
source ~/.bashrc | ||
|
||
# see https://irkernel.github.io/installation/ | ||
|
||
echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' > ~/.Rprofile | ||
|
||
cat <<EOF >./register.to.jupyter.r | ||
install.packages('IRkernel') | ||
# + The kernel spec can be installed for the current user with the following line from R: | ||
# IRkernel::installspec() | ||
# + To install system-wide, set user to False in the installspec command: | ||
IRkernel::installspec(user = FALSE) | ||
EOF | ||
# ---- | ||
# - unfortunately, it seems the @techrah/text-shortcuts extension is no longer available | ||
# jupyter labextension install @techrah/text-shortcuts | ||
# source ~/.bashrc && conda install -y -c conda-forge @techrah/text-shortcuts | ||
# conda install -y -c conda-forge @techrah/text-shortcuts | ||
# --- | ||
|
||
# --- | ||
# the symlink so that anaconda thinks its him who installed jupyter...? | ||
# ln -s /usr/local/bin/jupyter ${HOME}/anaconda3/bin/jupyter | ||
# But we want sweeties, so...: | ||
# https://github.com/deathbeds/jupyterlab-deck | ||
# conda install -y -c conda-forge jupyterlab-deck # even with the above symlink, i don't think that any conda install command would change anything to the jupyter lab | ||
apt-get install -y git git-flow | ||
# --- about [libxrender1], see https://github.com/decoder-leco/poc-data-visualization/issues/9#issuecomment-1987203379 | ||
# --- about [libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev], see https://github.com/decoder-leco/decoderleco_deces_europe_reloaded/pull/1#issuecomment-1987265383 | ||
apt-get install -y libxrender1 libfontconfig1-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev | ||
|
||
python -m pip install jupyterlab-deck jupyterlab-git | ||
|
||
R --version | ||
Rscript --version | ||
|
||
Rscript ./register.to.jupyter.r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters