Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
roypaulin committed Apr 16, 2024
1 parent 3bf34ee commit 9f69d2a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
49 changes: 21 additions & 28 deletions docker-verticapy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# Copyright 2023 Open Text

ARG PYTHON_VERSION="3.9-slim-buster"
ARG GF_PORT=3000
ARG SPARK_VERSION="3.3.2"
FROM python:${PYTHON_VERSION}

ENV PIP_NO_CACHE_DIR=1
ARG GF_PORT
ENV PIP_NO_CACHE_DIR=true
ARG SPARK_VERSION

WORKDIR /project
Expand All @@ -15,8 +13,10 @@ COPY requirements.txt requirements.txt
COPY ./bin /usr/bin/
COPY ./extensions-v2/ /project/

RUN apt-get update \
&& apt-get install -y --fix-missing\
ENV SHELL "/bin/bash"
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends -yqq \
software-properties-common \
gpg \
libgdal-dev \
Expand All @@ -31,33 +31,26 @@ RUN apt-get update \
curl \
dirmngr \
apt-transport-https \
lsb-release ca-certificates
lsb-release ca-certificates \
&& curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get -y install nodejs \
&& pip install --upgrade pip \
&& pip install -r requirements.txt \
&& pip install /project/vertica_tools \
&& pip install PySpark==${SPARK_VERSION} PrettyTable \
&& rm -r /project/vertica_tools \
&& chmod 755 /usr/bin/admintools \
&& chmod 755 /usr/bin/vsql \
&& chmod 755 /usr/bin/run-vsql \
&& chmod 755 /usr/bin/run-admintools \
&& rm requirements.txt \
&& apt-get clean

RUN apt-get upgrade -y
RUN apt-get clean
EXPOSE 8888

ENV SPARK_HOME=/opt/spark
ENV SPARK_VERSION=${SPARK_VERSION}

# Install python dependencies
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
&& apt-get -y install nodejs \
&& pip install --upgrade pip \
&& pip install -r requirements.txt \
&& pip install /project/vertica_tools \
&& pip install PySpark==${SPARK_VERSION} \
&& pip install PrettyTable \
&& rm -r /project/vertica_tools \
&& chmod 755 /usr/bin/admintools \
&& chmod 755 /usr/bin/vsql \
&& chmod 755 /usr/bin/run-vsql \
&& chmod 755 /usr/bin/run-admintools \
&& rm requirements.txt


EXPOSE 8888

ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SPARK_HOME/bin:$SPARK_HOME/sbin:$PATH
ENV JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"

ENTRYPOINT ["jupyter", "lab","--ip=0.0.0.0","--allow-root"]
ENTRYPOINT ["jupyter", "lab","--ip=0.0.0.0","--allow-root"]
2 changes: 1 addition & 1 deletion docker-verticapy/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jupyterlab-lsp==5.0.0
python-lsp-server[all]
ipython==8.18.0
ipywidgets==8.1.0
voila==0.5.4
voila==0.5.6
graphviz==0.20.1
plotly==5.14.1
verticapy
Expand Down
2 changes: 1 addition & 1 deletion etc/VerticaPyLab.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ VERTICAPYLAB_IMG=verticapy-jupyterlab
VERTICAPYLAB_IMG_VERSION=latest
VERTICAPYLAB_PORT=8889 # Optionally set VERTICALAB_PORT=RANDOM
VERTICAPYLAB_BIND_ADDRESS=127.0.0.1 # change to 0.0.0.0 if you want to connect from a remote
PYTHON_VERSION=3.10-slim-buster
PYTHON_VERSION=3.10.13-slim-bullseye

#
# Vertica server
Expand Down

0 comments on commit 9f69d2a

Please sign in to comment.