|
|
|
FROM ubuntu:18.04 |
|
|
|
|
|
ENV NB_USER jovyan |
|
ENV NB_UID 1000 |
|
ENV HOME /home/${NB_USER} |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
tar \ |
|
wget \ |
|
bash \ |
|
rsync \ |
|
gcc \ |
|
libfreetype6-dev \ |
|
libhdf5-serial-dev \ |
|
libpng-dev \ |
|
libzmq3-dev \ |
|
python3 \ |
|
python3-dev \ |
|
python3-pip \ |
|
unzip \ |
|
pkg-config \ |
|
software-properties-common \ |
|
graphviz \ |
|
openjdk-8-jdk \ |
|
ant \ |
|
ca-certificates-java \ |
|
&& apt-get clean \ |
|
&& update-ca-certificates -f; |
|
|
|
|
|
RUN add-apt-repository ppa:deadsnakes/ppa \ |
|
&& apt-get update \ |
|
&& apt-get install -y python3.8 python3-pip \ |
|
&& apt-get clean; |
|
|
|
|
|
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/ |
|
RUN mkdir -p ${HOME} \ |
|
&& echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/" >> ${HOME}/.bashrc \ |
|
&& chown -R ${NB_UID}:${NB_UID} ${HOME} |
|
|
|
|
|
RUN useradd -m -u ${NB_UID} ${NB_USER} |
|
|
|
|
|
USER ${NB_USER} |
|
|
|
|
|
ENV HOME=/home/${NB_USER} \ |
|
PATH=/home/${NB_USER}/.local/bin:$PATH |
|
|
|
|
|
WORKDIR ${HOME} |
|
|
|
|
|
RUN python3.8 -m pip install --upgrade pip |
|
COPY requirements.txt /tmp/requirements.txt |
|
RUN python3.8 -m pip install -r /tmp/requirements.txt |
|
|
|
|
|
COPY --chown=${NB_USER}:${NB_USER} . ${HOME} |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
ENTRYPOINT ["streamlit", "run", "Demo.py", "--server.port=7860", "--server.address=0.0.0.0"] |