UFund-Me / Qbot

[🔥updating ...] AI 自动量化交易机器人(完全本地部署) AI-powered Quantitative Investment Research Platform. 📃 online docs: https://ufund-me.github.io/Qbot ✨ :news: qbot-mini: https://github.com/Charmve/iQuant
https://github.com/Charmve
MIT License
7.51k stars 1.04k forks source link

Can not build docker image #13

Open lez-s opened 1 year ago

lez-s commented 1 year ago

🐛 Bug Description

Fail to build docker image.

Sending build context to Docker daemon  660.9MB
Step 1/5 : ARG tag
Step 2/5 : FROM gitlab/gitlab-runner-helper:${tag}
invalid reference format

To Reproduce

Steps to reproduce the behavior: docker build -t fund_strategy .

I think problem is the Dockerfile, variable tag is not set.

ARG tag
FROM gitlab/gitlab-runner-helper:${tag}
RUN addgroup -g 1000 -S nonroot && \
    adduser -u 1000 -S nonroot -G nonroot
WORKDIR /home/Qbot
USER 1000:1000
github-actions[bot] commented 1 year ago

Hey @{user}! Welcome to the QBOT repo on Github.

seekincs commented 1 year ago

Yes, the tag argument should be set by --build-arg, so thedocker build command should be like

docker build -t fund_strategy --build-arg tag=x86_64-00722032-nanoserver21H2 .

Available tags can be found here.

Charmve commented 1 year ago
  1. 基金策略在线分析

需要 node 开发环境: npmnode,点击查看详细操作文档

版本信息(作为参考):

▶ go version
go version go1.20.4 darwin/amd64
~
▶ node --version
v19.7.0
~
▶ npm --version
9.5.0

运行命令

cd pyfunds/fund-strategies

npm install
npm start

或者使用docker运行项目

在项目路径下运行以下命令构建项目的docker镜像

docker build -t fund_strategy .

镜像构建完毕后运行

docker run -dp 8000:8000 fund_strategy --name="fund_strategy_instance"

等待项目启动过程中,可通过以下命令查看启动日志:

docker log -f fund_strategy_instance

启动后,可通过http://locahost:8000访问网页。



👉 详细内容可以参考安装手册 https://ufund-me.github.io/Qbot/#/01-新手指引/Install_guide

lez-s commented 1 year ago

as seekincs said.

helloyan commented 1 year ago
root@x:~# docker start add31ae40cc8
Error response from daemon: No such container: add31ae40cc8
Error: failed to start containers: add31ae40cc8
root@x:~# docker run -dp 8000:8000 fund_strategy --name="fund_strategy_instance"
790734da6a4d5f3d34559af9a237c0575a073ab51dd3e9d1dab8c0562b334005
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--name=fund_strategy_instance": executable file not found in $PATH: unknown.

文档和上面的内容都看了,两种启动方法都报错

lez-s commented 1 year ago
```shell
root@x:~# docker start add31ae40cc8
Error response from daemon: No such container: add31ae40cc8
Error: failed to start containers: add31ae40cc8
root@x:~# docker run -dp 8000:8000 fund_strategy --name="fund_strategy_instance"
790734da6a4d5f3d34559af9a237c0575a073ab51dd3e9d1dab8c0562b334005
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--name=fund_strategy_instance": executable file not found in $PATH: unknown.

文档和上面的内容都看了,两种启动方法都报错

please use Microsoft Qlib instead of this, I don't think this one is ready for use. https://github.com/microsoft/qlib

xinmans commented 1 year ago
```shell
docker build -t fund_strategy --build-arg tag=x86_64-00722032-nanoserver21H2 .

(base) PS D:\Qbot> docker build -t fund_strategy --build-arg tag=x86_64-00722032-nanoserver21H2 . ERROR: failed to read metadata: invalid character '\x00' looking for beginning of value