我有一个在kubernetes集群中运行的JupyterHub。 如果我尝试基于以下docker镜像启动一个新笔记本,则我将无法以某种方式导入笔记本中已安装的tensorflow软件包。
笔记本映像的Dockerfile:
ARG BASE_CONTAINER=jupyter/base-notebook
FROM $BASE_CONTAINER
# Build as jupyterhub/singleuser
# Run with the DockerSpawner in JupyterHub
MAINTAINER Project Jupyter <jupyter@googlegroups.com>
ADD install_jupyterhub /tmp/install_jupyterhub
ARG JUPYTERHUB_VERSION=0.9.6
# install pinned jupyterhub and ensure notebook is installed
RUN python3 /tmp/install_jupyterhub && \
python3 -m pip install notebook
RUN pip install --user --upgrade tensorflow==2.0.0-alpha0 # install in $HOME
导入尝试失败:
import tensorflow as tf
--> Not found
笔记本映像的Dockerfile有什么问题?