-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
34 lines (27 loc) · 1.18 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
# Base image Debian stretch python 3.6
FROM python:3.7.4-slim-buster
# Update Ubuntu Software repository
RUN apt-get update
RUN apt-get install -y vim
RUN apt-get install -y patch
# Upgrade pip
RUN pip install --upgrade pip
# Create folder structure and install requirements
RUN mkdir -p /trader
ADD ./requirements.txt /trader
WORKDIR /trader
RUN pip3 install -r requirements.txt
# Add code and update the working directory
ADD . /trader
WORKDIR /trader
VOLUME /trader
VOLUME /Users/renero/trader/output:/trader/output
VOLUME /Users/renero/trader/staging:/trader/staging
VOLUME /tmp:/tmp
# Patch tensorflow
RUN patch /usr/local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py < /trader/output/tf_patch1.patch
RUN patch /usr/local/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py < /trader/output/tf_patch2.patch
RUN patch /usr/local/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py < /trader/output/tf_patch3.patch
# Run the application with unbuffered output to see it on real time
ENV PYTHONPATH "${PYTHONPATH}:/trader:/trader/utils:/trader/predictor:/trader/trader:/trader/indicators:/trader/retriever:/trader/updater"
CMD /trader/pipeline.sh