Back

Not possible to build Lean:algorithm docker container

Hi All,

Can you please help.

I tried to build Lean from docker without success.

I managed to build Lean:foundation but when I try to build Lean:Algorithm I'm getting error below:

 

(base) d@dpc:~/Lean$ docker build -t quantconnect/lean:algorithm -f Dockerfile .
Sending build context to Docker daemon    564MB
Step 1/5 : FROM quantconnect/lean:foundation
 ---> 7f631430dc6a
Step 2/5 : MAINTAINER QuantConnect <contact@quantconnect.com>
 ---> Using cache
 ---> a511adb4a824
Step 3/5 : COPY ./Launcher/bin/Release /root/Lean/Launcher/bin/Release
COPY failed: stat /var/lib/docker/tmp/docker-builder415840919/Launcher/bin/Release: no such file or directory

 

Update Backtest







0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hey Don Q,

Have tried running Lean for both C# and Python? It may be possible that some files are missing because Lean was not compiled. (refer to this thread)

Please also change

COPY ./Launcher/bin/Release /root/Lean/Launcher/bin/Release

to

COPY ./Launcher/bin/Debug /root/Lean/Launcher/bin/Debug

Let us know if that works or if there are any further issues.

Best
Rahul

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Rahul,

What do you mean by "running Lean for both C# and Python?"

I couldn't find any tutorlial or just simple file with steps to follow.

I followed this steps on ubuntu 18.04

1) Installed docker-ce

2) Cloned Lean and build lean:foundation package which os OK. When I cloned lean there is no folder 

./Launcher/bin

git clone https://github.com/QuantConnect/Lean.git
cd Lean
docker build -t quantconnect/lean:foundation -f DockerfileLeanFoundation .
docker build -t quantconnect/lean:algorithm -f Dockerfile .

Error Message:
(base) d@dpc:~/Lean$ docker build -t quantconnect/lean:algorithm -f Dockerfile .
Sending build context to Docker daemon 564MB
Step 1/5 : FROM quantconnect/lean:foundation
---> 7f631430dc6a
Step 2/5 : MAINTAINER QuantConnect <contact@quantconnect.com>
---> Using cache
---> a511adb4a824
Step 3/5 : COPY ./Launcher/bin/Release /root/Lean/Launcher/bin/Release
COPY failed: stat /var/lib/docker/tmp/docker-builder415840919/Launcher/bin/Release: no such file or directory
0

https://www.quantconnect.com/forum/discussion/2400/avoiding-vendor-lock-in-running-lean-on-your-server

 

When I red this artickel I understood you can run lean directly from container so no compilation is needed "OS Setup: We provide a docker file so you can setup the OS instantly by following along with the docker setup - or running just running LEAN in the docker container we provide."

0

Hey Don Q,

Lean still needs to be compiled to be able to run. The dockerfile Lean foundation sets up the enviroment on which Lean runs. We still need copy a compiled version of Lean into that enviroment. This is the Dockerfile and this is the DockerfileLeanFoundation.

Best
Rahul

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed