#FROM tensorflow/tensorflow:2.10.0-gpu-jupyter FROM tensorflow/tensorflow:2.9.1-gpu ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 build-essential make vim curl wget \ git r-base r-cran-e1071 -yq RUN wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb && \ apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb -yq ENV SDKMAN_DIR="/usr/local/sdkman" RUN curl -s "https://get.sdkman.io" | bash RUN bash -c "source /usr/local/sdkman/bin/sdkman-init.sh && \ yes | sdk install java 11.0.11.9.1-amzn && \ yes | sdk install ant 1.10.10 && \ rm -rf $SDKMAN_DIR/archives/* && \ rm -rf $SDKMAN_DIR/tmp/*" # used by javac to read .java files. ENV ANT_OPTS="-Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=iso-8859-1" RUN /usr/bin/python3 -m pip install --upgrade pip # TODO: see if you can clone hugginface or gitlab.com from here ??? COPY requirements-gradio.txt /tmp COPY requirements-lungseg.txt /tmp COPY requirements-ldta.txt /tmp RUN pip install -r /tmp/requirements-gradio.txt -r /tmp/requirements-lungseg.txt -r /tmp/requirements-ldta.txt RUN pip install vtk-osmesa --extra-index-url https://gitlab.kitware.com/api/v4/projects/13/packages/pypi/simple RUN wget https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64 && \ mv frpc_linux_amd64 /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2 && \ chmod 777 /usr/local/lib/python3.8/dist-packages/gradio/frpc_linux_amd64_v0.2 ENV HF_HOME=/opt/.cache RUN mkdir -p ${HF_HOME} && chmod -R 777 ${HF_HOME} WORKDIR /opt RUN mkdir -p /opt/demo && chmod -R 777 /opt/demo COPY --chmod=777 . /opt/demo WORKDIR /opt/demo CMD ["python","app.py"]