Docker 鏡像 - 構(gòu)建 JupyterLab With Plugin

? 構(gòu)建鏡像

1、編輯 Dockerfile

FROM python:3

# 安裝 Nodejs
RUN apt update && curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt install -y nodejs

# 安裝 jupyterlab
RUN python -m pip install jupyterlab

# 安裝 jupyterlab 插件
RUN jupyter labextension install @jupyterlab/git && pip install jupyterlab-git && jupyter serverextension enable --py jupyterlab_git

# 設(shè)置默認(rèn)環(huán)境變量
ENV NOTEBOOK_APP_TOKEN=anoyi NOTEBOOK_DIR=/home

# 暴露端口號(hào)
EXPOSE 8888

#  運(yùn)行 jupyterlab
CMD jupyter lab --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token=${NOTEBOOK_APP_TOKEN} --notebook-dir=${NOTEBOOK_DIR}

2、構(gòu)建鏡像

docker  build -t jupyterlab .

? 相關(guān)資料

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容