代码拉取完成,页面将自动刷新
同步操作将从 Larry史明春/zipline-new 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#
# Dockerfile for an image with the currently checked out version of zipline installed. To build:
#
# docker build -t quantopian/zipline .
#
# To run the container:
#
# docker run -v /path/to/your/notebooks:/projects -v ~/.zipline:/root/.zipline -p 8888:8888/tcp --name zipline -it quantopian/zipline
#
# To access Jupyter when running docker locally (you may need to add NAT rules):
#
# https://127.0.0.1
#
# default password is jupyter. to provide another, see:
# http://jupyter-notebook.readthedocs.org/en/latest/public_server.html#preparing-a-hashed-password
#
# once generated, you can pass the new value via `docker run --env` the first time
# you start the container.
#
# You can also run an algo using the docker exec command. For example:
#
# docker exec -it zipline zipline run -f /projects/my_algo.py --start 2015-1-1 --end 2016-1-1 -o /projects/result.pickle
#
FROM python:3.5
#
# set up environment
#
ENV TINI_VERSION v0.10.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
ENV PROJECT_DIR=/projects \
NOTEBOOK_PORT=8888 \
SSL_CERT_PEM=/root/.jupyter/jupyter.pem \
SSL_CERT_KEY=/root/.jupyter/jupyter.key \
PW_HASH="u'sha1:31cb67870a35:1a2321318481f00b0efdf3d1f71af523d3ffc505'" \
CONFIG_PATH=/root/.jupyter/jupyter_notebook_config.py
#
# install TA-Lib and other prerequisites
#
RUN mkdir ${PROJECT_DIR} \
&& apt-get -y update \
&& apt-get -y install libfreetype6-dev libpng-dev libopenblas-dev liblapack-dev gfortran libhdf5-dev \
&& curl -L https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz | tar xvz
#
# build and install zipline from source. install TA-Lib after to ensure
# numpy is available.
#
WORKDIR /ta-lib
RUN pip install 'numpy>=1.11.1,<2.0.0' \
&& pip install 'scipy>=0.17.1,<1.0.0' \
&& pip install 'pandas>=0.18.1,<1.0.0' \
&& ./configure --prefix=/usr \
&& make \
&& make install \
&& pip install TA-Lib \
&& pip install matplotlib \
&& pip install jupyter
#
# This is then only file we need from source to remain in the
# image after build and install.
#
ADD ./etc/docker_cmd.sh /
#
# make port available. /zipline is made a volume
# for developer testing.
#
EXPOSE ${NOTEBOOK_PORT}
#
# build and install the zipline package into the image
#
ADD . /zipline
WORKDIR /zipline
RUN pip install -e .
#
# start the jupyter server
#
WORKDIR ${PROJECT_DIR}
CMD /docker_cmd.sh
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。