Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build failure - Add Tini and set version range for numpy #1514

Merged
merged 2 commits into from Sep 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 9 additions & 3 deletions Dockerfile
Expand Up @@ -26,6 +26,11 @@ FROM python:2.7
#
# 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", "--"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a good executive summary somewhere of the benefits of using tini as the container pid 1? I'm aware vaguely that it solves issues with zombie processes not being correctly reaped, but I don't have a clear sense of concrete cases where it fixes issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't dig much into it, but this is the best explanation I found krallin/tini#8 .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth I am running it with docker-compose .


ENV PROJECT_DIR=/projects \
NOTEBOOK_PORT=8888 \
SSL_CERT_PEM=/root/.jupyter/jupyter.pem \
Expand All @@ -49,13 +54,14 @@ RUN mkdir ${PROJECT_DIR} \

WORKDIR /ta-lib

RUN pip install numpy==1.9.2 \
&& pip install scipy==0.15.1 \
&& pip install pandas==0.16.1 \
RUN pip install 'numpy>=1.11.1,<2.0.0' \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest zipline is also on pandas 0.18.1 and scipy 0.17.1 if you want to bump those as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, latest commit sets the version range for pandas and scipy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note I added && pip install matplotlib \ to the Dockerfile in order to fix an error when executing zipline/examples/buyapple.ipynb .

&& 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

#
Expand Down