From 0214b3004c85e5447749ffae1f11660628366d4b Mon Sep 17 00:00:00 2001 From: Linlang Date: Thu, 27 Jun 2024 12:34:24 +0800 Subject: [PATCH] add docs --- Dockerfile | 4 ++-- README.md | 19 +++++++++++++++++++ build_docker_image.sh | 5 +++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 019d045c86..4ed2c048c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,8 @@ RUN python -m pip install importlib-metadata==5.2.0 RUN python -m pip install "cloudpickle<3" RUN python -m pip install scikit-learn==1.3.2 -RUN pip install cython packaging tables matplotlib statsmodels +RUN python -m pip install cython packaging tables matplotlib statsmodels -RUN python setup.py install +RUN python -m pip install pyqlib EXPOSE 10050 diff --git a/README.md b/README.md index 773eeaf39b..c827cba7cf 100644 --- a/README.md +++ b/README.md @@ -272,6 +272,25 @@ We recommend users to prepare their own data if they have a high-quality dataset ``` --> +## Build docker images +Running `build_docker_image.sh` is the right choice when you want to create a docker image for qlib. Of course, before running it, please open this file and make some necessary changes according to your docker hub account. + ```bash + #!/bin/bash + + # Build the Docker image + sudo docker build -t qlib_image -f ./Dockerfile . + + # Log in to Docker Hub + # If you are a new docker hub user, please verify your email address before proceeding with this step. + sudo docker login + + # Tag the Docker image + sudo docker tag qlib_image /qlib_image:stable + + # Push the Docker image to Docker Hub + sudo docker push /qlib_image:stable + ``` + ## Auto Quant Research Workflow Qlib provides a tool named `qrun` to run the whole workflow automatically (including building dataset, training models, backtest and evaluation). You can start an auto quant research workflow and have a graphical reports analysis according to the following steps: diff --git a/build_docker_image.sh b/build_docker_image.sh index 89429fe646..ecca14f1cc 100644 --- a/build_docker_image.sh +++ b/build_docker_image.sh @@ -4,10 +4,11 @@ sudo docker build -t qlib_image -f ./Dockerfile . # Log in to Docker Hub +# If you are a new docker hub user, please verify your email address before proceeding with this step. sudo docker login # Tag the Docker image -sudo docker tag qlib_image linlanglv/qlib_image:stable +sudo docker tag qlib_image /qlib_image:stable # Push the Docker image to Docker Hub -sudo docker push linlanglv/qlib_image:stable +sudo docker push /qlib_image:stable