hikyuu icon indicating copy to clipboard operation
hikyuu copied to clipboard

有计划搞个docker版本吗?

Open better319 opened this issue 2 years ago • 3 comments

用的e5的cpu,估计是硬伤了,不知道docker版本的有救不?

better319 avatar May 16 '22 07:05 better319

https://github.com/pchaos/Docker-hikyuu

fasiondog avatar May 16 '22 14:05 fasiondog

可以的,看你需要什么的 base image,我目前基础 rocky linux 8 ,后期可以提交 pr

大致的构建步骤如下:


COPY pyenv/requirements.txt /opt/pyenv-packages/requirements.txt

ENV XMAKE_ROOT=y

# install - python pacakges and hikyuu
RUN --mount=type=cache,target=/var/cache,id=build-cache \
    --mount=type=cache,target=/tmp,id=build-tmp \
    \
    pip3 install -r /opt/pyenv-packages/requirements.txt

# install - python pacakges and hikyuu
RUN --mount=type=cache,target=/var/cache,id=build-cache \
    --mount=type=cache,target=/tmp,id=build-tmp \
    --mount=type=bind,from=packages,source=/packages,target=/packages,rw \
    \
    source ~/.bashrc \
    && proxy \
    # install xmake
    && bash <(curl -fsSL https://xmake.io/shget.text) \
    && source ~/.xmake/profile \
    && echo 'source ~/.xmake/profile' >> ~/.bashrc \
    && echo 'source ~/.xmake/profile' >> ~/.zshrc \
    && xmake --version \
    \
    && cd /packages/hikyuu \
    && tar zxf hikyuu-1.2.6.tar.gz \
    && tar zxf boost_1_69_0.tar.gz -C hikyuu-1.2.6/ \
    && cd hikyuu-1.2.6 \
    && python setup.py build -j 24 \
    # && python setup.py test \
    && python setup.py install

LiaoSirui avatar Nov 20 '22 10:11 LiaoSirui

可以的,看你需要什么的 base image,我目前基础 rocky linux 8 ,后期可以提交 pr

大致的构建步骤如下:

COPY pyenv/requirements.txt /opt/pyenv-packages/requirements.txt

ENV XMAKE_ROOT=y

# install - python pacakges and hikyuu
RUN --mount=type=cache,target=/var/cache,id=build-cache \
    --mount=type=cache,target=/tmp,id=build-tmp \
    \
    pip3 install -r /opt/pyenv-packages/requirements.txt

# install - python pacakges and hikyuu
RUN --mount=type=cache,target=/var/cache,id=build-cache \
    --mount=type=cache,target=/tmp,id=build-tmp \
    --mount=type=bind,from=packages,source=/packages,target=/packages,rw \
    \
    source ~/.bashrc \
    && proxy \
    # install xmake
    && bash <(curl -fsSL https://xmake.io/shget.text) \
    && source ~/.xmake/profile \
    && echo 'source ~/.xmake/profile' >> ~/.bashrc \
    && echo 'source ~/.xmake/profile' >> ~/.zshrc \
    && xmake --version \
    \
    && cd /packages/hikyuu \
    && tar zxf hikyuu-1.2.6.tar.gz \
    && tar zxf boost_1_69_0.tar.gz -C hikyuu-1.2.6/ \
    && cd hikyuu-1.2.6 \
    && python setup.py build -j 24 \
    # && python setup.py test \
    && python setup.py install

baolongzhanshi/hikyuu 这个吗?

marobot/quantos-all

方便给个链接吗?感谢ing

better319 avatar Nov 21 '22 06:11 better319