Skip to content

Commit 4246a9e

Browse files
committed
Merge branch 'hotfix/2.1.2'
2 parents 51eb943 + cf4d811 commit 4246a9e

File tree

4 files changed

+54
-17
lines changed

4 files changed

+54
-17
lines changed

Dockerfile

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,61 @@
1-
FROM centos:7.6.1810
1+
FROM python:3.7-buster as dependencies
2+
COPY api/src/main/resources/requirements.txt /
3+
RUN apt-get update && \
4+
apt-get install -y libssl-dev libsasl2-dev libffi-dev cython3
5+
RUN pip3 install -r requirements.txt
26

3-
RUN yum install -y epel-release
4-
RUN yum install -y python36-devel python36-pip cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-plain libffi-devel openssl-devel gcc gcc-c++
57

6-
COPY api/src/main/resources /deployment-manager/
8+
FROM python:3.7-slim-buster
79

8-
WORKDIR /deployment-manager
10+
LABEL maintainer="[email protected]" \
11+
organization="gradiant.org"
912

10-
RUN pip3 install -r requirements.txt
13+
ENV VERSION=2.1.2
14+
# Create app directory
15+
WORKDIR /deployment-manager
16+
# Adding python runtime dependencies
17+
COPY --from=dependencies /requirements.txt ./
18+
COPY --from=dependencies /root/.cache /root/.cache
19+
## Adding OS runtime dependencies
20+
RUN apt-get update && \
21+
apt-get install -y libssl1.1 libsasl2-2 libsasl2-modules-gssapi-mit libffi6 && \
22+
rm -rf /var/lib/apt/lists/* && \
23+
pip3 install -r requirements.txt
1124

1225
# GIT http server to serve notebooks to jupyterhub
13-
RUN yum install -y git nginx fcgiwrap && \
26+
RUN apt-get update && \
27+
apt-get install -y git nginx fcgiwrap && \
28+
rm -rf /var/lib/apt/lists/* && \
1429
git config --global user.email "[email protected]" && \
1530
git config --global user.name "pnda" && \
1631
mkdir -p /data/git-repos/ && \
17-
mkdir -p /data/stage/
32+
mkdir -p /data/stage/
33+
34+
# Spark distribution to submit spark jobs.
35+
# Installed openjdk-8 since spark 2.4.4 does not yet support Java 11
36+
# need unstable repo from debian buster
37+
ENV JAVA_HOME=/usr/lib/jvm/default-jvm/ \
38+
SPARK_VERSION=2.4.4 \
39+
SPARK_HOME=/opt/spark
40+
ENV PATH="$PATH:$SPARK_HOME/sbin:$SPARK_HOME/bin" \
41+
SPARK_URL="local[*]" \
42+
PYTHONPATH="${SPARK_HOME}/python/lib/pyspark.zip:${SPARK_HOME}/python/lib/py4j-src.zip:$PYTHONPATH" \
43+
SPARK_OPTS="" \
44+
PYSPARK_PYTHON=/usr/bin/python3
45+
RUN mkdir -p /usr/share/man/man1 && \
46+
echo "deb http://deb.debian.org/debian unstable main" > /etc/apt/sources.list.d/91-unstable.list && \
47+
apt-get update && apt-get install -y openjdk-8-jre-headless wget && rm /etc/apt/sources.list.d/91-unstable.list && rm -rf /var/lib/apt/lists/* && \
48+
cd /usr/lib/jvm && ln -s java-8-openjdk-amd64 default-jvm && \
49+
wget -qO- https://archive.apache.org/dist/spark/spark-$SPARK_VERSION/spark-$SPARK_VERSION-bin-hadoop2.7.tgz | tar xvz -C /opt && \
50+
ln -s /opt/spark-$SPARK_VERSION-bin-hadoop2.7 /opt/spark && \
51+
cd /opt/spark/python/lib && ln -s py4j-*-src.zip py4j-src.zip
52+
53+
# Bundle app source
54+
COPY api/src/main/resources ./
1855
COPY docker/nginx.conf /etc/nginx/nginx.conf
19-
COPY docker/entrypoint.sh /entrypoint.sh
56+
COPY docker/entrypoint.sh .
57+
2058
# PNDA platform users must transition from Linux SO users to cloud-native. For now we add a pnda user to container images.
2159
RUN useradd pnda
2260

23-
ENTRYPOINT "/entrypoint.sh"
24-
61+
ENTRYPOINT ["./entrypoint.sh"]

api/src/main/resources/application_summary_registrar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import json
22
import logging
33
import happybase
4-
from thriftpy.transport import TTransportException
4+
from thriftpy2.transport import TTransportException
55
from Hbase_thrift import AlreadyExists
66

77
#pylint: disable=E0602
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
argparse==1.2.1
22
certifi==2017.4.17
33
cffi==1.9.1
4-
cryptography==1.7.1
4+
cryptography==2.8
55
enum34==1.1.6
6-
happybase==1.0.0
6+
happybase==1.2.0
77
idna==2.1
88
ipaddress==1.0.17
99
ordereddict==1.1
@@ -14,13 +14,13 @@ pycparser==2.17
1414
pyhs2==0.6.0
1515
pywebhdfs==0.4.1
1616
pyyaml==4.2b1
17-
requests==2.20.0
17+
requests==2.22.0
1818
sasl==0.2.1
1919
singledispatch==3.4.0.3
2020
six==1.10.0
2121
spur==0.3.20
2222
starbase==0.3.3
2323
thrift==0.9.3
24-
thriftpy==0.3.9
24+
thriftpy2==0.4.8
2525
tornado==4.4.2
2626
tornado-cors==0.6.0

docker/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ server {
4343
location ~ (/.*) {
4444
fastcgi_pass unix:/var/run/fcgiwrap.socket;
4545
include fastcgi_params;
46-
fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
46+
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
4747
fastcgi_param GIT_HTTP_EXPORT_ALL "";
4848
fastcgi_param GIT_PROJECT_ROOT /data/git-repos;
4949
fastcgi_param REMOTE_USER $remote_user;

0 commit comments

Comments
 (0)