File size: 1,134 Bytes
35f5b84
75f5664
 
35f5b84
 
 
 
 
 
 
75f5664
 
 
 
 
35f5b84
75f5664
35f5b84
 
 
75f5664
35f5b84
75f5664
 
 
 
35f5b84
 
96bbfb7
b0dce8d
35f5b84
75f5664
 
35f5b84
b0dce8d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Base image
FROM ubuntu:18.04

# Install required libraries
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 \
    libgomp1 && apt-get clean

# Set environment variables
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

# Install Python 3.8
RUN add-apt-repository ppa:deadsnakes/ppa && \
    apt-get update && apt-get install -y python3.8 python3-pip && apt-get clean

# Upgrade pip and install dependencies
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 application code
WORKDIR /home/jovyan
COPY streamlit.py /home/jovyan/streamlit.py

# Expose port
EXPOSE 7860

# Entry point
ENTRYPOINT ["streamlit", "run", "/home/jovyan/streamlit.py", "--server.port=7860", "--server.address=0.0.0.0"]