-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install java for spark and R-datascience images (for packages like RJ…
…Demetra) (#181) * moved java install in separate .sh, added libbz2-dev for jdk compiler * typos since jupyter-spark-r does not exist * make use of JAVA_HOME for Renviron, added java test for spark images * dummy changes for matrix to build from base * dev * debug * no spaces * debug * debug more * tweaked main-workflow to copy scripts in opt for all images * typo in README + debug mode * debug more * typo * put also script install-java for rdatascience * forgot java version variables for r-datascience * apt-get update in r-datascience before install-java.sh * took ouf debug code * added ENV in dockerfiles so vars are passed to containers * move libbz2 into install-jva.sh for
- Loading branch information
Showing
8 changed files
with
44 additions
and
15 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
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 |
---|---|---|
|
@@ -3,10 +3,18 @@ FROM $BASE_IMAGE | |
|
||
LABEL maintainer="InseeFrLab <[email protected]>" | ||
|
||
ARG JAVA_VERSION="17" | ||
ENV JAVA_VERSION=${JAVA_VERSION} | ||
ENV JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-openjdk-amd64" | ||
ENV PATH="${JAVA_HOME}/bin:${PATH}" | ||
|
||
USER root | ||
|
||
# Install additional libraries and R packages for datascience | ||
RUN /opt/install-quarto.sh && \ | ||
RUN apt-get update && \ | ||
# Install JDK | ||
/opt/install-java.sh && \ | ||
/opt/install-quarto.sh && \ | ||
# Install Shiny Server | ||
/rocker_scripts/install_shiny_server.sh && \ | ||
# Install packages bundles from rocker | ||
|
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
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,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
apt-get install -y --no-install-recommends \ | ||
ca-certificates-java \ | ||
openjdk-${JAVA_VERSION}-jre-headless \ | ||
openjdk-${JAVA_VERSION}-jdk-headless \ | ||
libbz2-dev # for jdk | ||
|
||
if command -v R; then | ||
R CMD javareconf | ||
fi |
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
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
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 |
---|---|---|
|
@@ -6,27 +6,30 @@ LABEL maintainer="InseeFrLab <[email protected]>" | |
ARG BASE_IMAGE | ||
|
||
ARG SPARK_VERSION="3.5.0" | ||
|
||
ENV SPARK_VERSION=${SPARK_VERSION} | ||
ENV JAVA_VERSION="17" | ||
|
||
ENV JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-openjdk-amd64" | ||
ENV PATH="${JAVA_HOME}/bin:${PATH}" | ||
|
||
ENV HADOOP_HOME="/opt/hadoop" | ||
ENV SPARK_HOME="/opt/spark" | ||
ENV HIVE_HOME="/opt/hive" | ||
ENV PYTHONPATH="$SPARK_HOME/python:$SPARK_HOME/python/lib/py4j-0.10.9.7-src.zip" | ||
ENV SPARK_OPTS="--driver-java-options=-Xms1024M --driver-java-options=-Xmx4096M" | ||
ENV JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64" | ||
|
||
ENV HADOOP_OPTIONAL_TOOLS="hadoop-aws" | ||
|
||
ENV PATH="${JAVA_HOME}/bin:${SPARK_HOME}/bin:${HADOOP_HOME}/bin:${PATH}" | ||
ENV PATH="${SPARK_HOME}/bin:${HADOOP_HOME}/bin:${PATH}" | ||
|
||
USER root | ||
|
||
RUN --mount=type=secret,id=github_token \ | ||
apt-get update && \ | ||
# Install JDK | ||
apt-get install -y --no-install-recommends \ | ||
ca-certificates-java \ | ||
openjdk-17-jre-headless && \ | ||
# Install Spark/Hadoop/Hive | ||
/opt/install-java.sh && \ | ||
# Install Spark/Hadoop/Hive | ||
/opt/install-spark-hadoop-hive.sh && \ | ||
# Put Spark config in the right place | ||
cp /opt/spark-env.sh $SPARK_HOME/conf && \ | ||
|
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