docker for ci test
This commit is contained in:
23
.dockerignore
Normal file
23
.dockerignore
Normal file
@@ -0,0 +1,23 @@
|
||||
__pycache__
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.pyd
|
||||
.Python
|
||||
env
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
.tox
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*,cover
|
||||
*.log
|
||||
.git
|
||||
*.md
|
||||
!README*.md
|
||||
README-secret.md
|
||||
.drone.yml
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM python:3.9.0
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get -y install build-essential libssl-dev \
|
||||
&& apt-get clean \
|
||||
&& pip install --upgrade pip
|
||||
|
||||
RUN pip3 install Cython numpy
|
||||
|
||||
# Prepare environment
|
||||
RUN mkdir /jesse-docker
|
||||
WORKDIR /jesse-docker
|
||||
|
||||
# Install TA-lib
|
||||
COPY docker_build_helpers/* /tmp/
|
||||
RUN cd /tmp && /tmp/install_ta-lib.sh && rm -r /tmp/*ta-lib*
|
||||
ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
|
||||
|
||||
COPY . /jesse-docker
|
||||
|
||||
# Install dependencies
|
||||
RUN pip3 install -e .
|
||||
|
||||
# Build
|
||||
RUN python setup.py bdist_wheel
|
||||
|
||||
ENTRYPOINT pytest
|
||||
17
docker_build_helpers/install_ta-lib.sh
Executable file
17
docker_build_helpers/install_ta-lib.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
if [ -z "$1" ]; then
|
||||
INSTALL_LOC=/usr/local
|
||||
else
|
||||
INSTALL_LOC=${1}
|
||||
fi
|
||||
echo "Installing to ${INSTALL_LOC}"
|
||||
if [ ! -f "${INSTALL_LOC}/lib/libta_lib.a" ]; then
|
||||
tar zxvf ta-lib-0.4.0-src.tar.gz
|
||||
cd ta-lib \
|
||||
&& sed -i.bak "s|0.00000001|0.000000000000000001 |g" src/ta_func/ta_utility.h \
|
||||
&& ./configure --prefix=${INSTALL_LOC}/ \
|
||||
&& make \
|
||||
&& which sudo && sudo make install || make install \
|
||||
&& echo "export LD_LIBRARY_PATH=/usr/local/lib" >> /root/.bashrc
|
||||
else
|
||||
echo "TA-lib already installed, skipping installation"
|
||||
fi
|
||||
BIN
docker_build_helpers/ta-lib-0.4.0-src.tar.gz
Normal file
BIN
docker_build_helpers/ta-lib-0.4.0-src.tar.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user