forked from cuemacro/finmarketpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 1.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM tschm/jupyter:1.2.0 as builder
# File Author / Maintainer
# MAINTAINER Thomas Schmelzer "[email protected]"
ENV HOME /home/${NB_USER}
ENV APP_ENV docker
COPY --chown=jovyan:users . /tmp/finmarketpy
COPY . ${HOME}
USER root
RUN chown -R ${NB_UID} ${HOME}
# Install snappy for pystore and ODBC
USER root
# Minimal dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libsnappy-dev gcc g++ unixodbc-dev
# Dependencies for pystore and weasyprint in buildDeps
# If we don't want to use weasyprint we
# build-essential libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
# RUN buildDeps='gcc g++ libsnappy-dev unixodbc-dev build-essential libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info' && \
# apt-get update && apt-get install -y $buildDeps --no-install-recommends
# Switch back to jovyan to avoid accidental container runs as root
USER $NB_UID
RUN pip install --no-cache-dir -r /tmp/finmarketpy/requirements.txt && \
rm -rf /tmp/finmarketpy
RUN ln -s /home/${NB_USER}/finmarketpy /home/${NB_USER}/work/finmarketpy
RUN ln -s /home/${NB_USER}/finmarketpy_examples /home/${NB_USER}/work/finmarketpy_examples
RUN ln -s /home/${NB_USER}/finmarketpy_examples/finmarketpy_notebooks /home/${NB_USER}/work/finmarketpy_examples/finmarketpy_notebooks