Skip to content

Commit 66f6ff7

Browse files
committed
upgrade ibgateway
1 parent e75b148 commit 66f6ff7

File tree

27 files changed

+1813
-57
lines changed

27 files changed

+1813
-57
lines changed

docker-compose.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ services:
224224

225225
ib-gateway:
226226
container_name: "ib-gateway"
227-
image: mgvazquez/ibgateway:latest
227+
build:
228+
context: ./ibgateway-master
228229
restart: always
229230
ports:
230231
- "7497:7497"

dockerfile_airflow/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM apache/airflow:2.4.0-python3.8
1+
FROM apache/airflow:2.4.3-python3.9
22

33
USER root
44
RUN apt-get update && apt-get install -y \
@@ -12,12 +12,12 @@ RUN apt-get update && apt-get install -y \
1212
# TA-Lib
1313
RUN curl -L https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz | tar xvz
1414

15-
RUN pip3 install 'numpy==1.22.4' \
15+
RUN pip3 install 'numpy==1.23.5' \
1616
&& cd ta-lib/ \
1717
&& ./configure --prefix=/usr \
1818
&& make \
1919
&& make install \
20-
&& pip3 install 'TA-Lib==0.4.24'
20+
&& pip3 install 'TA-Lib==0.4.28'
2121
RUN cd .. && rm -rf ta-lib/
2222
ENV NUMBA_CACHE_DIR=/tmp
2323

@@ -29,6 +29,6 @@ RUN pip3 install --requirement /tmp/requirements.txt
2929
ENV PYTHONPATH "${PYTHONPATH}:/usr/local/airflow/dags"
3030
ENV NUMBA_CACHE_DIR=/tmp
3131

32-
COPY locator.py /home/airflow/.local/lib/python3.8/site-packages/backtrader/plot/locator.py
33-
COPY plot.py /home/airflow/.local/lib/python3.8/site-packages/backtrader/plot/plot.py
34-
COPY yahoo.py /home/airflow/.local/lib/python3.8/site-packages/backtrader/feeds/yahoo.py
32+
COPY locator.py /home/airflow/.local/lib/python3.9/site-packages/backtrader/plot/locator.py
33+
COPY plot.py /home/airflow/.local/lib/python3.9/site-packages/backtrader/plot/plot.py
34+
COPY yahoo.py /home/airflow/.local/lib/python3.9/site-packages/backtrader/feeds/yahoo.py

dockerfile_airflow/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
numpy==1.22.4
2-
TA_Lib==0.4.24
3-
pandas==1.5.2
1+
numpy==1.23.5
2+
TA_Lib==0.4.28
3+
pandas==1.5.3
44
numba==0.56.4
55
#seaborn==0.11.1
66
#ipython==7.26.0

dockerfile_jupyter_notebook/Dockerfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM jupyter/datascience-notebook
1+
FROM jupyter/datascience-notebook:python-3.9.13
22

33
USER root
44

@@ -22,12 +22,12 @@ RUN apt-get update && apt-get install -y \
2222
RUN curl -L https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz | tar xvz
2323
#WORKDIR /ta-lib
2424
# numpy needs to be installed before TA-Lib
25-
RUN pip3 install 'numpy==1.19.2' \
25+
RUN pip3 install 'numpy==1.23.5' \
2626
&& cd ta-lib/ \
2727
&& ./configure --prefix=/usr \
2828
&& make \
2929
&& make install \
30-
&& pip3 install 'TA-Lib==0.4.20'
30+
&& pip3 install 'TA-Lib==0.4.28'
3131
RUN cd .. && rm -rf ta-lib/
3232

3333
COPY requirements.txt /tmp/
@@ -44,22 +44,22 @@ RUN python -m pip install --upgrade --no-deps --force-reinstall notebook
4444
RUN python -m pip install jupyterthemes
4545
RUN python -m pip install --upgrade jupyterthemes
4646
RUN python -m pip install jupyter_contrib_nbextensions
47-
RUN jupyter contrib nbextension install --user
47+
# RUN jupyter contrib nbextension install --user
4848
# enable the Nbextensions
49-
RUN jupyter nbextension enable contrib_nbextensions_help_item/main
50-
RUN jupyter nbextension enable autosavetime/main
51-
RUN jupyter nbextension enable codefolding/main
52-
RUN jupyter nbextension enable code_font_size/code_font_size
53-
RUN jupyter nbextension enable code_prettify/code_prettify
54-
RUN jupyter nbextension enable collapsible_headings/main
55-
RUN jupyter nbextension enable comment-uncomment/main
56-
RUN jupyter nbextension enable equation-numbering/main
57-
RUN jupyter nbextension enable execute_time/ExecuteTime
58-
RUN jupyter nbextension enable gist_it/main
59-
RUN jupyter nbextension enable hide_input/main
60-
RUN jupyter nbextension enable spellchecker/main
61-
RUN jupyter nbextension enable toc2/main
62-
RUN jupyter nbextension enable toggle_all_line_numbers/main
49+
#RUN jupyter nbextension enable contrib_nbextensions_help_item/main
50+
#RUN jupyter nbextension enable autosavetime/main
51+
#RUN jupyter nbextension enable codefolding/main
52+
#RUN jupyter nbextension enable code_font_size/code_font_size
53+
#RUN jupyter nbextension enable code_prettify/code_prettify
54+
#RUN jupyter nbextension enable collapsible_headings/main
55+
#RUN jupyter nbextension enable comment-uncomment/main
56+
#RUN jupyter nbextension enable equation-numbering/main
57+
#RUN jupyter nbextension enable execute_time/ExecuteTime
58+
#RUN jupyter nbextension enable gist_it/main
59+
#RUN jupyter nbextension enable hide_input/main
60+
#RUN jupyter nbextension enable spellchecker/main
61+
#RUN jupyter nbextension enable toc2/main
62+
#RUN jupyter nbextension enable toggle_all_line_numbers/main
6363

6464
CMD ["jupyter", "notebook", "--no-browser","--NotebookApp.token=''","--NotebookApp.password=''", "--allow-root"]
6565

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
psycopg2-binary
2-
mlflow==1.4.0
3-
sklearn
2+
mlflow
3+
scikit-learn
44
xgboost
55
IBPy2
66
backtrader2
@@ -13,29 +13,25 @@ ffn
1313
pyfolio
1414
quantstats
1515
riskfolio_lib==3.3.0
16-
#riskfolio-lib==0.1.5.1
17-
black_box==1.0.2
18-
statsmodels==0.12.1
19-
shap==0.39.0
20-
yfinance==0.1.63
21-
scipy==1.6.0
22-
requests==2.25.1
23-
pandas_market_calendars==2.0
24-
pandas_datareader==0.9.0
25-
graphviz==0.16
26-
pandas_profiling==3.0.0
27-
tqdm==4.59.0
28-
featurewiz==0.0.42
29-
ib_insync==0.9.65
30-
pytz==2021.1
31-
tabulate==0.8.7
32-
joblib==1.0.0
33-
#airflow==0.6
34-
ccxt==1.93.1
35-
fracdiff==0.5.1
36-
ibapi==9.81.1.post1
37-
PyYAML==5.4.1
38-
#Twisted==21.7.0
39-
#v20==3.0.25.0
16+
black_box
17+
statsmodels
18+
shap
19+
yfinance
20+
scipy
21+
requests
22+
pandas_market_calendars
23+
pandas_datareader
24+
graphviz
25+
pandas_profiling
26+
tqdm
27+
featurewiz
28+
ib_insync
29+
pytz
30+
tabulate
31+
joblib
32+
ccxt
33+
fracdiff
34+
ibapi
35+
PyYAML
4036
xverse
4137
chart-studio
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
psycopg2-binary
22
mlflow==1.4.0
3-
sklearn
3+
scikit-learn
44
xgboost
55
xlrd
6-
ffn
76

87

dockerfile_superset/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM apache/superset:2.0.0
1+
FROM apache/superset:2.1.1
22
USER root
33
RUN apt-get update && apt-get install -y \
44
bash vim \

ibgateway-master/.gitlab-ci.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
#
2+
# Function Library (c)2019 - Version 0.0.1
3+
#
4+
# This template is free: you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation, either version 3 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This template is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# Autor: Garcia Vazquez, Manuel Andres - DevOps
15+
16+
# Web: www.scabb-island.com.ar
17+
# Repo: https://github.com/mgvazquez/ibgateway
18+
# Issues: https://github.com/mgvazquez/ibgateway/issues
19+
#
20+
# Nota: <NOTA>
21+
#
22+
23+
######### Variables ###########
24+
25+
# Variable Usage & Precedence:
26+
#
27+
# - CI_REGISTRY_PASSWORD: Token de la registry a donde se subira la imagen
28+
# - CI_REGISTRY_USER: Usuario de la registry a donde se subira la imagen
29+
# - IMAGE_NAME: Nombre de la imagen, en caso de no setearse, se utilizara el namespace del proyecto
30+
# - GOOGLE_APPLICATION_CREDENTIALS: Decalre esta variable en la UI de Gitlab en formato File para habilitar el push a GCR
31+
32+
variables:
33+
# CI_DEBUG_TRACE: "true"
34+
CI_BUILD_IMAGE: "mgvazquez/docker-build-image:19.03.12"
35+
IMAGE_NAME: "${CI_PROJECT_PATH}"
36+
DOCKER_REGISTRY_SNAPSHOTS: "registry.gitlab.com"
37+
DOCKER_REGISTRY_RELEASES: "registry.gitlab.com"
38+
DOCKER_REGISTRY_GCLOUD: gcr.io
39+
40+
###############################
41+
42+
########## Templates ##########
43+
.bannerBuilding: &bannerBuilding |
44+
echo "Building ${BUILD_TYPE} [${CI_COMMIT_REF_NAME}]"
45+
46+
.checkRegistry: &checkRegistry |
47+
if [[ ("x${CI_REGISTRY_USER}" != "x") && ("x${CI_REGISTRY_PASSWORD}" != "x") && ("x${GOOGLE_APPLICATION_CREDENTIALS}" == "x") ]]; then
48+
echo "${CI_REGISTRY_PASSWORD}" | docker login -u "${CI_REGISTRY_USER}" --password-stdin "${DOCKER_REGISTRY}";
49+
fi
50+
51+
.runVersionCheck: &runTagCheck |
52+
export DOCKER_IMAGE_NAME="${DOCKER_REGISTRY}/${IMAGE_NAME}"
53+
export DOCKER_IMAGE_TAG="${CI_COMMIT_TAG:-${CI_COMMIT_REF_NAME}}";
54+
55+
.runMakePackage: &runMakePackage |
56+
export DOCKER_HOST="${DOCKER_PORT}"
57+
docker build \
58+
--build-arg BUILD_DATE="$(date --utc '+%Y-%m-%d %H:%M:%S UTC')" \
59+
--build-arg BUILD_VCS_REF="${CI_COMMIT_SHA}" \
60+
--build-arg BUILD_VERSION="${DOCKER_IMAGE_TAG}" \
61+
--build-arg BUILD_PROJECT_URL="${CI_PROJECT_URL}" \
62+
--build-arg BUILD_COMMITER_NAME="${GITLAB_USER_NAME}" \
63+
--build-arg BUILD_COMMITER_MAIL="${GITLAB_USER_EMAIL}" \
64+
-t ${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} \
65+
.;
66+
67+
.publishPackage: &publishPackage |
68+
docker push ${DOCKER_IMAGE_NAME};
69+
###############################
70+
71+
############ Tasks ############
72+
########## Defaults ###########
73+
default:
74+
image:
75+
name: ${CI_BUILD_IMAGE}
76+
entrypoint: [""]
77+
services:
78+
- name: docker:19.03.12-dind
79+
alias: dind
80+
before_script:
81+
- git remote set-url origin git@${CI_SERVER_HOST}:${CI_PROJECT_PATH}.git
82+
- git checkout ${CI_COMMIT_REF_NAME}
83+
- *checkRegistry
84+
85+
# NOTE: implementar estos stages ~> https://docs.gitlab.com/ee/ci/yaml/README.html#pre-and-post
86+
stages:
87+
- .pre
88+
- build
89+
- .post
90+
###############################
91+
92+
###### BUILD-* #####
93+
generate_build:
94+
stage: build
95+
variables:
96+
DOCKER_REGISTRY: "${DOCKER_REGISTRY_SNAPSHOTS}"
97+
script:
98+
- *bannerBuilding
99+
- *runTagCheck
100+
- *runMakePackage
101+
- *publishPackage
102+
allow_failure: false
103+
except:
104+
refs:
105+
- triggers
106+
variables:
107+
- $CI_COMMIT_REF_NAME =~ /^development$/
108+
- $CI_COMMIT_REF_NAME =~ /^master$/
109+
####################
110+
111+
##### Snapshot #####
112+
generate_snapshot:
113+
stage: build
114+
variables:
115+
DOCKER_REGISTRY: "${DOCKER_REGISTRY_SNAPSHOTS}"
116+
script:
117+
- *bannerBuilding
118+
- *runTagCheck
119+
- *runMakePackage
120+
- *publishPackage
121+
allow_failure: false
122+
only:
123+
variables:
124+
- $CI_COMMIT_REF_NAME =~ /^development$/
125+
except:
126+
refs:
127+
- triggers
128+
####################
129+
130+
###### Release #####
131+
generate_release:
132+
stage: build
133+
variables:
134+
DOCKER_REGISTRY: "${DOCKER_REGISTRY_RELEASES}"
135+
script:
136+
- *bannerBuilding
137+
- *runTagCheck
138+
- *runMakePackage
139+
- *publishPackage
140+
allow_failure: false
141+
only:
142+
variables:
143+
- $CI_COMMIT_REF_NAME =~ /^master/
144+
- $CI_COMMIT_TAG != null
145+
except:
146+
refs:
147+
- triggers
148+
####################
149+
150+
###############################

0 commit comments

Comments
 (0)