forked from himanshu2406/Algo.Py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (34 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
49 lines (34 loc) · 1.41 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM python:3.11
WORKDIR /app
RUN apt-get update && \
apt-get install -yq --no-install-recommends cmake && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN wget https://netcologne.dl.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz && \
tar -xvzf ta-lib-0.4.0-src.tar.gz && \
cd ta-lib/ && \
./configure --prefix=/usr --build=unknown-unknown-linux && \
make && \
make install
RUN rm -R ta-lib ta-lib-0.4.0-src.tar.gz
RUN pip install --no-cache-dir TA-Lib==0.4.32
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN pip install --quiet --no-cache-dir 'pybind11' \
&& pip install --quiet --no-cache-dir --ignore-installed 'llvmlite' \
&& pip install --quiet --no-cache-dir --no-deps 'universal-portfolios' \
&& pip install --quiet --no-cache-dir 'pandas_datareader' \
&& pip install --quiet --no-cache-dir jupyter ipykernel supervisor
COPY supervisord.conf /etc/supervisord.conf
RUN python -m ipykernel install --user --name=python3 --display-name "Python 3"
ARG BACKTEST_BACKEND
RUN if [ "$BACKTEST_BACKEND" = "vectorbt" ]; then \
pip install -U --no-cache-dir vectorbt; \
elif [ "$BACKTEST_BACKEND" = "vectorbtpro" ]; then \
pip install -U "vectorbtpro[base] @ git+https://github.com/polakowo/vectorbt.pro.git"; \
fi
ENV PYTHONPATH="${PYTHONPATH}:/app"
EXPOSE 8501
EXPOSE 8888
CMD ["supervisord", "-c", "/etc/supervisord.conf"]