From 8e1a5f5e99f493d30bd487717b4ce4eec0930e8f Mon Sep 17 00:00:00 2001 From: Linlang Date: Thu, 27 Jun 2024 10:03:55 +0800 Subject: [PATCH] add dockerfile --- .dockerignore | 8 ++++++++ Dockerfile | 26 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000..bc00efde3a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +__pycache__ +*.pyc +*.pyo +*.pyd +.Python +.env +.git + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..019d045c86 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM continuumio/miniconda3:latest + +WORKDIR /qlib + +COPY . . + +RUN apt-get update && \ + apt-get install -y build-essential + +RUN conda create --name qlib_source python=3.8 +RUN echo "conda activate qlib_source" >> ~/.bashrc +ENV PATH /opt/conda/envs/qlib_source/bin:$PATH + +RUN python -m pip install --upgrade pip + +RUN python -m pip install numpy==1.23.5 +RUN python -m pip install pandas==1.5.3 +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 setup.py install + +EXPOSE 10050