小编Kha*_*ned的帖子

使用 jupyter notebook 运行 docker image 的问题

我有一个 jupyter 笔记本和一个文件夹中的数据文件。我做了一个 Dockerfile 并写了以下几行

FROM jupyter/base-notebook

ARG export_file=FooD_Kind.csv

RUN pip install jupyter

RUN pip install numpy

RUN pip install matplotlib

RUN pip install pandas

RUN pip install pulp

COPY $export_file FooD_Kind.csv

COPY task_4kind.ipynb /

CMD ["jupyter notebook", "task_4kind.ipynb"]
Run Code Online (Sandbox Code Playgroud)

我可以使用docker build -t nameofimageBut成功构建图像docker run -it nameofimage。我收到一个错误[FATAL tini (7)] exec jupyter notebook failed: No such file or directory

如何在 docker 中运行这个 jupyter notebook?

编辑:

我在最后一行尝试了两次替换,
我用

# Start the jupyter notebook
ENTRYPOINT ["jupyter", "notebook", "--ip=*"] …
Run Code Online (Sandbox Code Playgroud)

python docker jupyter-notebook

5
推荐指数
1
解决办法
1347
查看次数

标签 统计

docker ×1

jupyter-notebook ×1

python ×1