Files
quantconnect--lean/run_docker_iqfeed.bat
Colton Sellers 7238fcd0f3 Bug 4809 Docker Run Script Fixes and Improvements (#4922)
* Refactor and hotfix run script

Removed dependency on `realpath`, notably absent from macOS and some debian distros. Replaced with an equivalent bash function.

Cleaned up prompt response handling, replaced var tests with param expressions.

Removed potentially uneeded calls to sudo (again absent on some systems and most users are part of the docker group anyway). Instead, test if it's needed and get preauth with sudo -v.

Poll for running and stopped Lean containers, and prompt before replacing them. Would fail prior.

Uppercased variabled. Sorry.

* Revert docker output redirection to stderr

* Adjustments to maintain all functionality

* Mimic behavior across run scripts

* Update readme to reflect Docker script changes

* Ignore results storage

* Correct print statement

* Mirror changes on research docker scripts

* Make executable

* Handle already running container and sudo privs

* Fix for issues found in testing

* Address Review

* Small adjustments found in linux testing

* Doc improvement

* Add auto update option for Docker images

* Fix image var reference

Co-authored-by: Peter Kazazes <peter@peterk.co>
2020-11-11 15:48:02 -03:00

57 lines
1.6 KiB
Batchfile

@echo off
REM QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
REM Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
set DOCKER_PARAMS=
set iqconnect_exec="C:\Program Files (x86)\DTN\IQFeed\iqconnect.exe"
set iqfeed_product_name=
set iqfeed_version=1.0
set iqfeed_login=
set iqfeed_password=
REM Do not edit after this line
set iqconnect_command=%iqconnect_exec%
if "%iqfeed_product_name%" == "" (
echo Error: iqfeed_product_name must be set.
goto :eof
) else (
set iqconnect_command=%iqconnect_command% -product %iqfeed_product_name%
)
if "%iqfeed_version%" == "" (
echo Error: iqfeed_version must be set.
goto :eof
) else (
set iqconnect_command=%iqconnect_command% -version %iqfeed_version%
)
if not "%iqfeed_login%" == "" (
set iqconnect_command=%iqconnect_command% -login %iqfeed_login%
)
if not "%iqfeed_password%" == "" (
set iqconnect_command=%iqconnect_command% -password %iqfeed_password%
)
echo IQConnect starting...
start "IQConnect" %iqconnect_command%
timeout /t 30
call run_docker.bat