Skip to content

Commit

Permalink
feature(add rlang #9): install conda
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Baptiste-Lasselle committed Mar 9, 2024
1 parent 4923ad6 commit e4ca423
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,31 @@ docker-compose up -d jupyter_deno

# docker-compose logs -f jupyter_deno

# --- # ---
# ---
# -
# docker-compose down && git checkout . && git checkout feature/jb/first/notebooks && git pull && docker-compose build jupyter_deno && docker-compose up -d jupyter_deno && docker-compose logs -f jupyter_deno
```

* go to http://localhost:8888/lab/ , and use `decoderleco` as the token to login

<!--
Little helper for working with VirtualBox VM as a docker runner
```bash
scp -r jbl@mongo.pesto.io:/home/jbl/poc-data-visualization/notebooks/jb/PolarsDemo1.ipynb ./notebooks/jb/
scp -r jbl@jupyter-spark.pesto.io:/home/jbl/poc-data-visualization/notebooks/jb/PolarsDemo1.ipynb ./notebooks/jb/
scp -r jbl@jupyter-deno.pesto.io:/home/jbl/poc-data-visualization/notebooks/jb/PolarsDemo1.ipynb ./notebooks/jb/
# and in the VM:
# docker-compose down && git checkout . && git checkout feature/jb/first/notebooks && git pull && docker-compose build jupyter_deno && docker-compose up -d jupyter_deno && docker-compose logs -f jupyter_deno
```
-->

## Stack

Ce POC utilise le stack technologique suivant:
Expand Down
14 changes: 13 additions & 1 deletion oci/deno-jupyter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN bash -c 'source ~/.bashrc && deno jupyter --unstable --install' && \
RUN mkdir -p $DATAVIZ_NOTEBOOKS_HOME


FROM build as runner
FROM build as deno_runner

RUN mkdir -p /run

Expand All @@ -75,3 +75,15 @@ EXPOSE 8888

# CMD [ "/run/start.sh" ]
CMD [ "/run/start.debug.sh" ]


FROM deno_runner as add_r_kernel

RUN mkdir -p /kernels/extras/ && mkdir -p /kernels/ops/

WORKDIR /kernels/ops/
COPY add-rlang-kernel.sh .
RUN chmod +x ./add-rlang-kernel.sh && ./add-rlang-kernel.sh


WORKDIR /usr/dataviz/notebooks/decoderleco
36 changes: 36 additions & 0 deletions oci/deno-jupyter/add-rlang-kernel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# -------
# >>> https://docs.posit.co/ide/server-pro/user/2023.03.1/jupyter-lab/guide/jupyter-kernel-management.html#user-created-kernels
# --- this would be to add a kernel to jupyter lab, baed on a python venv
# instead of running [pip install ipykernel], we install it with a requirements.txt
# python -m pip install ipykernel
# cat <<EOF >./requirements.kernels.mgmt.txt
# ipykernel
# EOF
# python -m pip install -r requirements.kernels.mgmt.txt


# -------
# >>> https://datatofish.com/r-jupyter-notebook/
# ---

# ----
# Install CONDA
# > https://conda.io/projects/conda/en/latest/user-guide/install/linux.html#install-linux-silent

export CONDA_INSTALLER_DWNLD_LINK="https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
export CONDA_INSTALLER_FILENAME=$(echo "${CONDA_INSTALLER_DWNLD_LINK}" | awk -F '/' '{ print $NF }')
echo " CONDA_INSTALLER_DWNLD_LINK=[${CONDA_INSTALLER_DWNLD_LINK}]"
echo " CONDA_INSTALLER_FILENAME=[${CONDA_INSTALLER_FILENAME}]"

curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
export CONDA_INSTALLER_CHECKSUM_SHA256="b978856ec3c826eb495b60e3fffe621f670c101150ebcbdeede4f961f22dc438"

echo "${CONDA_INSTALLER_CHECKSUM_SHA256} ${CONDA_INSTALLER_FILENAME}" | ./conda.sha256.checksum
sha256sum -c ./conda.sha256.checksum
bash ${CONDA_INSTALLER_FILENAME}



echo 'y\n' | conda install -c r r-irkernel

0 comments on commit e4ca423

Please sign in to comment.