fbprophet镜像dockerfile

fbprophet dockerfile文件如下

FROM python:3.6.8-slim

WORKDIR /app

RUN apt-get -y update  && apt-get install -y \
  python3-dev \
  apt-utils \
  python-dev \
  build-essential \
&& rm -rf /var/lib/apt/lists/* \
&&   ln -sf /usr/share/zoneinfo/Asia/ShangHai /etc/localtime \
&&   echo "Asia/Shanghai" > /etc/timezone \
&&   dpkg-reconfigure -f noninteractive tzdata

RUN pip install --upgrade setuptools
RUN pip install cython
RUN pip install numpy
RUN pip install matplotlib
RUN pip install pystan
RUN pip install fbprophet

# Following CMD keeps the container running
# Modify CMD to run the app that you require. 
CMD tail -f /dev/null &

注意:设置东8区,FROM python:3.6.8-slim默认的时区是国外的时区

创建好Dockerfile文件后,在文件所在的目录执行类似以下命令

docker build -t 10.1.XX.XX:5000/prophetpython:1.0 .

注意命令最后有一个点

如果有docker私服

首先需要编辑daemon.json

 vi /etc/docker/daemon.json内容如下
{
        "insecure-registries":["10.1.XX.XX:5000"]
}

然后执行登录命令

docker login 10.1.XX.XX:5000/nai -u XXX -p XXX

最后push镜像到私服

docker push 10.1.XX.XX:5000/prophetpython:1.0

你可能感兴趣的:(prophet教程)