Skip to content
Snippets Groups Projects
Commit 0b418934 authored by Brice Copy's avatar Brice Copy
Browse files

Add JRE and Pyspark

parent 7fe0f05e
No related branches found
No related tags found
No related merge requests found
ARG FROM=cern/cc7-base
ARG FROM=gitlab-registry.cern.ch/industrial-controls/sw-infra/cc7-openjdk:jre-8
FROM $FROM
ARG SPARK_NXCALS_URL=http://photons-resources.cern.ch/downloads/nxcals_pro/spark/spark-nxcals.zip
......@@ -15,18 +15,24 @@ RUN curl -s -k -L -o /tmp/nxcals-spark.zip $SPARK_NXCALS_URL && \
cd $SPARK_HOME && bsdtar --strip-components=1 -xvf /tmp/nxcals-spark.zip && \
rm /tmp/nxcals-spark.zip
RUN adduser etlworker -m
ENV PATH $PATH:$SPARK_HOME:$SPARK_ENV/bin
RUN mkdir -p $SPARK_HOME/nxcals-python3-env && \
chown -R etlworker $SPARK_HOME
RUN adduser etlworker -m
COPY entrypoint.sh /
RUN chmod 755 /entrypoint.sh
USER etlworker
RUN cd ~etlworker && python3 -m venv spark-venv && \
source ~etlworker/spark-venv/bin/activate && \
pip3 install pyspark pandas scipy
RUN cd $SPARK_HOME && \
yes | source $SPARK_HOME/source-me.sh && \
source $SPARK_HOME/nxcals-python3-env/bin/activate && \
pip list && pip install pyspark==2.3.2 pandas scipy influxdb
VOLUME /auth
WORKDIR /work
WORKDIR $SPARK_HOME
ENTRYPOINT ["/entrypoint.sh"]
......@@ -15,7 +15,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spark.nxcals.url>http://photons-resources.cern.ch/downloads/nxcals_pro/spark/spark-nxcals.zip</spark.nxcals.url>
<docker.from>cern/cc7-base</docker.from>
<docker.from>gitlab-registry.cern.ch/industrial-controls/sw-infra/cc7-openjdk:jre-8</docker.from>
</properties>
<build>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment