Files
catalyst/etc/docker_cmd.sh
T
John Stanford 34f47da033 Added a Dockerfile for repeatable runtimes
Builds docker image with  TA-Lib, Jupyter, and checked out version of zipline and
starts Jupyter server on port https://localhost:8888 when container runs.  The
default password for the Jupyter server is 'jupyter'.

Instructions on usage found in the Dockerfile comments.  Example image at
docker.io/jxstanford/zipline.
2016-04-04 17:05:52 -04:00

20 lines
668 B
Bash
Executable File

#!/bin/bash
#
# generate configuration, cert, and password if this is the first run
#
if [ ! -f /var/tmp/zipline_init ] ; then
jupyter notebook --generate-config
if [ ! -f ${SSL_CERT_PEM} ] ; then
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=127.0.0.1" \
-keyout ${SSL_CERT_KEY} -out ${SSL_CERT_PEM}
fi
echo "c.NotebookApp.password = ${PW_HASH}" >> ${CONFIG_PATH}
touch /var/tmp/zipline_init
fi
jupyter notebook -y --no-browser --notebook-dir=${PROJECT_DIR} \
--certfile=${SSL_CERT_PEM} --keyfile=${SSL_CERT_KEY} --ip='*' \
--config=${CONFIG_PATH}