Facebook Prophet Docker环境准备工作

Facebook Prophet Docker environment preparation

1. 准备工作 (Preparation)

1.1. Docker镜像 (Docker image)

 1# Dockerfile based on miniconda, jupyter & prophet will be preinstalled.
 2FROM continuumio/miniconda3:24.4.0-0
 3
 4EXPOSE 9900
 5WORKDIR /opt
 6# RUN /bin/bash
 7#RUN conda install -c conda-forge jupyter -y --quiet
 8#RUN conda install -c conda-forge prophet -y --quiet
 9RUN conda install -c conda-forge jupyter -y
10RUN conda install -c conda-forge prophet -y
11# RUN conda install -c conda-forge plotly -y
12
13RUN mkdir -p /opt/notebooks
14CMD ["jupyter", "notebook", "--notebook-dir=/opt/notebooks", "--ip='*'", "--port=9900", "--no-browser", "--allow-root"]

Dockerfile download

1.2. 编译镜像 (Compile docker image)

1# The tag of image will be 'miniconda-jupyter-prophet:24.4.0-0'.
2docker build -t miniconda-jupyter-prophet:24.4.0-0 .

1.3. 启动容器 (Startup container)

1# Startup container (with volume mount)
2docker run -d --name miniconda-jupyter-prophet -p 59900:9900 -v /opt/docker_data/prophet-notebooks:/opt/notebooks miniconda-jupyter-prophet:24.4.0-0
3
4# Startup container (with out volume mount)
5docker run -d --name miniconda-jupyter-prophet -p 59900:9900 miniconda-jupyter-prophet:24.4.0-0

1.4. 容器初始化 (Init container)

1# Install deps inside of container [this will be move into Dockerfile]
2conda install -c conda-forge plotly --solver=classic
3# Fixed issue of conda command always tip error message like "Error while loading conda entry point: conda-libmamba-solver (libarchive.so.19: cannot open shared object file: No such file or directory)"
4conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive

Make sure all of dependencies coming from same channel of pip

作者|Author: RockSolid
发表日期|Publish Date: Jun 10, 2024
修改日期|Modified Date: Jun 10, 2024
版权许可|Copyright License: CC BY-NC-ND 3.0 CN