Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for other container runtimes #121

Closed
goshlanguage opened this issue Aug 2, 2022 · 4 comments
Closed

Support for other container runtimes #121

goshlanguage opened this issue Aug 2, 2022 · 4 comments

Comments

@goshlanguage
Copy link

Hey team,

First, love the project and thanks for all of your hard work.

Recently I've taken a look at lean-cli for personal use. On my laptop, I use colima as a replacement for Docker desktop due to the recent controversy surrounding their license agreement.

While my docker cli is mostly compliant via the podman interface, the docker client for python is hardcoded to only try to connect to the docker socket in /var/run/docker.sock

When I would try to run live, I would encounter the error:

lean live <flags>

Error: Please make sure Docker is installed and running
Visit https://www.lean.io/docs/lean-cli/key-concepts/troubleshooting#02-Common-Errors for more information

However, I can symlink the docker.sock file in its expected location and get it to run fine:

sudo ln -s $HOME/.colima/docker.sock /var/run/docker.sock

lean live <flags>

Pulling quantconnect/lean:latest...
latest: Pulling from quantconnect/lean
345e3491a907: Pulling fs layer 
57671312ef6f: Pulling fs layer 

Should we try to enumerate some of the docker alternatives and their socket locations to support other docker compliant runtimes, or document how to symlink sockets to the expected path in order to support running lean-cli for a broader set of runtime environments?

@jaredbroad
Copy link
Member

😬 At this point, we're stretched too thin to try and enable support for other non-docker hosts. I would welcome and appreciate a pull-request to enable support for colima but cannot assist in its design.

The top priority currently is to expand the lean-cli to map all the functionality of LEAN. We have so many brokerages and data sources supported in LEAN Core but they're pretty tricky to use since it is all buried in source. The LEAN CLI should able things like:

lean data download --source=yfinance AAPL ... 
lean data download --source=iex AAPL ... 
lean data download --source=iqfeed AAPL ... 

We're gearing up for a crowd-raise to try and increase our funding and bandwidth and would appreciate your help to improve the project further. If you like what we're doing, please join us in the raise =)

@goshlanguage
Copy link
Author

No worries. Best of luck!

@jowolf
Copy link

jowolf commented Jul 23, 2023

I for one would welcome podman compatibility, which is already designed to be a drop-in replacement for docker

j

@efJerryYang
Copy link
Contributor

For anyone who encountered the same issue with docker context here, this seems to be a bug in docker-py instead of lean-cli, and I believe a better workaround than creating a symbolic link is to overwrite DOCKER_HOST_PATH environment variable (and also the TMPDIR which is needed specifically for lean-cli in my use case).

You can check the context by docker context ls.

export DOCKER_HOST="unix:///Users/<username>/.colima/default/docker.sock"
export TMPDIR="$HOME/.lean/cli-tmp" # needed for local research, not sure for other local run

I saved the above lines in a script and load that script in a new shell to run lean by aliasing since I don't want to affect the global temp directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants