Dockerfile中给镜像添加自行执行
FROM nvidia:py38-torch112-gradio
MAINTAINER "chentiao_create"
ARG workdir=/home/recognize-anything-main
ADD . ${workdir}/
WORKDIR ${workdir}
EXPOSE 8089
RUN chmod +x gradio_test.py
ENTRYPOINT ["python3","gradio_test.py"]
以上就是例子,使用ENTRYPOINT要比CMD更容易成功
本文来自博客园,作者:海_纳百川,转载请注明原文链接:https://www.cnblogs.com/chentiao/p/17958443,如有侵权联系删除