Commit 3dd21da6 authored by Dr.李's avatar Dr.李

FEATURE: added docker file

parent 5a7dc1be
......@@ -7,7 +7,23 @@ RUN apt-get update && apt-get install git cmake build-essential gfortran -y
COPY ./alphamind /alphamind
COPY ./notebooks /notebooks
RUN cd /alphamind/pfopt
WORKDIR /alphamind/pfopt
RUN export BUILD_TEST=OFF
RUN export REDIRECT=$1
RUN bash build_linux.sh
\ No newline at end of file
RUN bash ./build_linux.sh
WORKDIR /
COPY ./requirements.txt /requirements.txt
RUN pip install numpy==1.19.1 -i https://pypi.douban.com/simple
RUN pip install -r /requirements.txt -i https://pypi.douban.com/simple
RUN pip install finance-python==0.8.1 -i https://pypi.douban.com/simple
COPY ./setup.py /setup.py
COPY ./setup.cfg /setup.cfg
RUN python setup.py build_ext --inplace
EXPOSE 8080
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD []
\ No newline at end of file
......@@ -107,7 +107,7 @@ alpha - mind 提供了多因子研究中常用的工具链,包括:
安装需要直接clone或者下载源代码安装,具体流程为:
1. 克隆项目到本地
克隆项目到本地
```
git clone https://github.com/alpha-miner/alpha-mind.git
cd alpha-mind
......@@ -119,16 +119,21 @@ git submodule update
cd ../..
```
2. 参照上节内容,编译好依赖的子项目。
### SOURCE
3. 确保环境变量'VS90COMNTOOLS'的值为安装的VS的Comntools下的地址,如'\vs2015\Common7\Tools\'
1. 参照上节内容,编译好依赖的子项目。
4. 回到项目的根目录下运行:
2. 回到项目的根目录下运行:
```python
python setup.py install
```
### Docker
1. `docker build -t alpha-mind:latest -f Dockerfile .`
* *注意事项*:
1. 在Linux系统上,请确保gcc版本大于4.8;
2. 在libs下面提供了依赖的一些库的二进制文件。linux版本的是在一台具有两个intel cpu的docker虚机上面编译完成的。如果需要实现最佳的性能,建议用户在目标机器上编译相关依赖的库。依赖的库源码地址:[portfolio-optimizer](https://github.com/alpha-miner/portfolio-optimizer)
......
#!/bin/sh
export PYTHONPATH=$PYTHONPATH:/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/alphamind/pfopt/lib
jupyter lab --ip="0.0.0.0" --port=8080 --allow-root --NotebookApp.token='' --NotebookApp.password=''
\ No newline at end of file
arrow >= 0.10.0
cython >= 0.25.2
cvxpy >= 1.0.3
deprecated >= 1.1.0
ecos >= 2.0.4
finance-python >= 0.5.7
numba >= 0.33.0
numpy >= 1.12.1
pandas >= 0.19.2
psycopg2 >= 2.7.1
scikit-learn >= 0.18.1
scipy >= 0.19.0
simpleutils >= 0.1.2
sqlalchemy >= 1.1.14
xgboost >= 0.90.0
\ No newline at end of file
arrow == 0.16.0
cython == 0.29.21
cvxpy == 1.1.5
deprecated == 1.2.10
ecos == 2.0.7.post1
jupyter == 1.0.0
jupyterlab == 2.2.6
matplotlib
numba == 0.51.1
numpy == 1.19.1
pandas == 1.1.1
psycopg2-binary == 2.8.5
scikit-learn ==0.23.2
scipy == 1.5.2
simpleutils == 0.2.6
sqlalchemy == 1.3.19
xgboost == 1.2.0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment