From 4ccbb2ddb0308df50c24d0ef5d5b72e6c6b735ab Mon Sep 17 00:00:00 2001 From: avouacr Date: Thu, 25 Apr 2024 18:21:21 +0000 Subject: [PATCH] fix: stop using rocker's script to install Python --- r-python-julia/Dockerfile | 10 +++++----- r-python-julia/tests.yaml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/r-python-julia/Dockerfile b/r-python-julia/Dockerfile index 6c6f8111..665f6228 100644 --- a/r-python-julia/Dockerfile +++ b/r-python-julia/Dockerfile @@ -4,7 +4,7 @@ FROM $BASE_IMAGE LABEL maintainer="InseeFrLab " ENV JULIA_DIR="/opt/julia" -ENV PATH="${JULIA_DIR}/bin:${PATH}" +ENV PATH="${HOME}/.local/bin:${JULIA_DIR}/bin:${PATH}" # Python config for the `reticulate` package ENV PYTHON_CONFIGURE_OPTS="--enable-shared" @@ -14,11 +14,11 @@ USER root COPY requirements.txt . -RUN wget -O - https://raw.githubusercontent.com/rocker-org/rocker-versioned2/R${R_VERSION}/scripts/install_python.sh | bash && \ - # Install base Python packages +RUN /opt/install-julia.sh && \ + # Install common Python packages pip3 install -r requirements.txt && \ - # Install Julia - /opt/install-julia.sh && \ + # Install reticulate to use Python in R + install2.r --error reticulate && \ # Install quarto /opt/install-quarto.sh && \ # Clean diff --git a/r-python-julia/tests.yaml b/r-python-julia/tests.yaml index 695dc80e..8d08e168 100644 --- a/r-python-julia/tests.yaml +++ b/r-python-julia/tests.yaml @@ -42,8 +42,8 @@ commandTests: expectedOutput: ["/usr/local/bin/R"] - name: "Does the binary exists?" command: "which" - args: ["python"] - expectedOutput: ["/usr/local/bin/python"] + args: ["python3"] + expectedOutput: ["/usr/bin/python3"] - name: "Does the binary exists?" command: "which" args: ["julia"]