Skip to content

Commit f849302

Browse files
authored
Merge pull request #53 from e2b-dev/update-r-to-44-e2b-1449
Update R to 4.4
2 parents 8b39743 + 31aabd3 commit f849302

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

.changeset/angry-paws-battle.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@e2b/code-interpreter-template': patch
3+
---
4+
5+
Update R to 4.4

template/Dockerfile

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM python:3.10.14
22

3-
ENV JAVA_HOME=/opt/java/openjdk
4-
ENV PATH="${JAVA_HOME}/bin:${PATH}"
5-
63
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends \
74
build-essential curl git util-linux jq sudo nodejs npm fonts-noto-cjk
85

@@ -11,15 +8,19 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
118
PIP_NO_CACHE_DIR=1 \
129
JUPYTER_CONFIG_PATH="/root/.jupyter" \
1310
IPYTHON_CONFIG_PATH="/root/.ipython" \
14-
SERVER_PATH="/root/.server"
11+
SERVER_PATH="/root/.server" \
12+
R_VERSION=4.4.2
13+
14+
ENV R_HOME=/opt/R/${R_VERSION} \
15+
JAVA_HOME=/opt/java/openjdk
1516

1617
# Install Jupyter
1718
COPY ./requirements.txt requirements.txt
1819
RUN pip install --no-cache-dir -r requirements.txt && ipython kernel install --name "python3" --user
1920

2021
# R Kernel
21-
RUN apt-get update && apt-get install -y r-base
22-
RUN R -e "install.packages('IRkernel')"
22+
RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb && sudo apt-get update && sudo apt-get install -y ./r-${R_VERSION}_1_amd64.deb && ln -s ${R_HOME}/bin/R /usr/bin/R
23+
RUN R -e "install.packages('IRkernel', repos='https://cloud.r-project.org')"
2324
RUN R -e "IRkernel::installspec(user = FALSE, name = 'r', displayname = 'R')"
2425

2526
# Javascript Kernel
@@ -63,6 +64,8 @@ COPY startup_scripts/* $IPYTHON_CONFIG_PATH/profile_default/startup
6364

6465

6566
COPY --from=eclipse-temurin:11-jdk $JAVA_HOME $JAVA_HOME
67+
RUN ln -s ${JAVA_HOME}/bin/java /usr/bin/java
68+
6669
# Java Kernel
6770
RUN wget https://github.com/SpencerPark/IJava/releases/download/v1.3.0/ijava-1.3.0.zip && \
6871
unzip ijava-1.3.0.zip && \

template/start-up.sh

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ function start_jupyter_server() {
2929
/root/.server/.venv/bin/uvicorn main:app --host 0.0.0.0 --port 49999 --workers 1 --no-access-log --no-use-colors
3030
}
3131

32-
export PATH="/opt/java/openjdk/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
33-
3432
echo "Starting Code Interpreter server..."
3533
start_jupyter_server &
3634
MATPLOTLIBRC=/root/.config/matplotlib/.matplotlibrc jupyter server --IdentityProvider.token="" >/dev/null 2>&1

0 commit comments

Comments
 (0)