sparknlp-gguf / Dockerfile
abdullahmubeen10's picture
Update Dockerfile
0584773 verified
raw
history blame
1.23 kB
FROM ubuntu:16.04
# Install Python 3.5 and basic tools
RUN apt-get update && apt-get install -y \
software-properties-common \
wget \
curl \
tar \
bash \
rsync \
gcc \
libfreetype6-dev \
libhdf5-dev \
libpng-dev \
libzmq5-dev \
unzip \
pkg-config \
graphviz \
openjdk-8-jdk \
python3.5 \
python3.5-dev \
python3-pip \
ant \
ca-certificates \
&& apt-get clean \
&& update-ca-certificates -f
# Install a pip version compatible with Python 3.5
RUN python3.5 -m pip install --upgrade "pip<21.0"
# Copy requirements file
COPY requirements.txt /tmp/requirements.txt
# Install Python dependencies
RUN python3.5 -m pip install --no-cache-dir -r /tmp/requirements.txt
# Create a new user
RUN useradd -m -u ${NB_UID} ${NB_USER}
# Switch to the new user
USER ${NB_USER}
# Set user-specific environment variables
ENV HOME=/home/${NB_USER}
ENV PATH=/home/${NB_USER}/.local/bin:$PATH
# Copy application code to the container
COPY --chown=${NB_USER}:${NB_USER} . ${HOME}
# Expose port for Streamlit
EXPOSE 7860
# Define the entry point for the container
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]