CoolFace
Apppublic

spark-nlp/VisionEncoderDecoderForImageCaptioning

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
1likes
Dockerfile70 linesDownload Raw Back to root
1# Download base image ubuntu 18.042FROM ubuntu:18.043 4# Set environment variables5ENV NB_USER jovyan6ENV NB_UID 10007ENV HOME /home/${NB_USER}8 9# Install required packages10RUN apt-get update && apt-get install -y \11    tar \12    wget \13    bash \14    rsync \15    gcc \16    libfreetype6-dev \17    libhdf5-serial-dev \18    libpng-dev \19    libzmq3-dev \20    python3 \21    python3-dev \22    python3-pip \23    unzip \24    pkg-config \25    software-properties-common \26    graphviz \27    openjdk-8-jdk \28    ant \29    ca-certificates-java \30    && apt-get clean \31    && update-ca-certificates -f;32 33# Install Python 3.8 and pip34RUN add-apt-repository ppa:deadsnakes/ppa \35    && apt-get update \36    && apt-get install -y python3.8 python3-pip \37    && apt-get clean;38 39# Set up JAVA_HOME40ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/41RUN mkdir -p ${HOME} \42    && echo "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/" >> ${HOME}/.bashrc \43    && chown -R ${NB_UID}:${NB_UID} ${HOME}44 45# Create a new user named "jovyan" with user ID 100046RUN useradd -m -u ${NB_UID} ${NB_USER}47 48# Switch to the "jovyan" user49USER ${NB_USER}50 51# Set home and path variables for the user52ENV HOME=/home/${NB_USER} \53    PATH=/home/${NB_USER}/.local/bin:$PATH54 55# Set the working directory to the user's home directory56WORKDIR ${HOME}57 58# Upgrade pip and install Python dependencies59RUN python3.8 -m pip install --upgrade pip60COPY requirements.txt /tmp/requirements.txt61RUN python3.8 -m pip install -r /tmp/requirements.txt62 63# Copy the application code into the container at /home/jovyan64COPY --chown=${NB_USER}:${NB_USER} . ${HOME}65 66# Expose port for Streamlit67EXPOSE 786068 69# Define the entry point for the container70ENTRYPOINT ["streamlit", "run", "Demo.py", "--server.port=7860", "--server.address=0.0.0.0"]