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更容易成功
posted @ 2024-01-11 13:53  海_纳百川  阅读(10)  评论(0编辑  收藏  举报
本站总访问量