FROM ubuntu:22.04 EXPOSE 7860 ENV HOST_PORT=7860 ENV TERM=xterm-256color ENV SHELL=/bin/bash ENV DEBIAN_FRONTEND=noninteractive #ENV TZ=America/New_York ENV WORKROOT=/tmp/workroot USER root # ----- COPY . ${WORKROOT}/ WORKDIR ${WORKROOT}/build #RUN if [ -f script/ext_build.sh ]; then # bash script/ext_build.sh; # fi #RUN [ -f script/ext_build.sh ] && bash script/ext_build.sh RUN bash script/ext_build_as_root.sh RUN chown -R 1000:1000 ${WORKROOT} # --------------------- USER 1000 WORKDIR ${WORKROOT}/build RUN bash script/ext_build_as_user.sh RUN chown -R 1000:1000 ${WORKROOT} # ------------ USER 1000 WORKDIR ${WORKROOT} ENTRYPOINT ["/bin/bash", "/tmp/workroot/entrypoint.sh"] #ENTRYPOINT [ "/bin/bash", "/tmp/startup.sh" ] # main $@ #CMD ["bash", "ext_run.sh" ] #CMD bash -c "bash script/ext_run.sh $REPO $PLATFORM && sleep infinity " #CMD "sleep infinity" RUN pip install panel # Copy app and startup script into container COPY app.py /app.py # Expose the required ports EXPOSE 7860 #CMD ["bash", "-c", "bash /tmp/start.sh && panel serve /app.py --port 7860 --allow-websocket-origin '*'"] CMD ["bash", "-c", "bash /tmp/start.sh & panel serve /app.py --port 7860 --allow-websocket-origin '*'"]