From f0cb61bb22810a002b84e56c66b62cda938323c2 Mon Sep 17 00:00:00 2001 From: 0xrushi <0xrushi@gmail.com> Date: Thu, 15 Aug 2024 00:37:15 -0400 Subject: [PATCH 1/5] add dockefile --- .gitignore | 3 + docker/Dockerfile.applesilicon | 47 +++ docker/Dockerfile.x86 | 47 +++ installation/macosx/ml4t.yml | 724 +++++++++++---------------------- pyproject.toml | 187 +++++++++ 5 files changed, 512 insertions(+), 496 deletions(-) create mode 100644 .gitignore create mode 100644 docker/Dockerfile.applesilicon create mode 100644 docker/Dockerfile.x86 create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..5b7e986f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +.lsp_symlink +.ipynb_checkpoints diff --git a/docker/Dockerfile.applesilicon b/docker/Dockerfile.applesilicon new file mode 100644 index 000000000..c3ce12ba7 --- /dev/null +++ b/docker/Dockerfile.applesilicon @@ -0,0 +1,47 @@ +FROM python:3.10-bullseye + +WORKDIR /app + +RUN apt-get update && apt-get install -y \ + build-essential \ + curl \ + software-properties-common \ + git \ + libatlas-base-dev \ + gfortran \ + pkg-config \ + libfreetype6-dev \ + hdf5-tools \ + libhdf5-dev \ + libhdf5-serial-dev \ + wget \ + && rm -rf /var/lib/apt/lists/* + +RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \ + tar -xvzf ta-lib-0.4.0-src.tar.gz && \ + cd ta-lib/ && \ + ./configure --prefix=/usr --build=aarch64-unknown-linux-gnu && \ + make && \ + make install && \ + cd .. && \ + rm -rf ta-lib-0.4.0-src.tar.gz ta-lib/ + +ENV LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH +ENV TA_LIBRARY_PATH=/usr/lib +ENV TA_INCLUDE_PATH=/usr/include + +RUN curl -sSL https://install.python-poetry.org | python3 - + +ENV PATH="${PATH}:/root/.local/bin" + +COPY pyproject.toml poetry.lock* ./ + +RUN poetry config virtualenvs.create false \ + && poetry install --no-interaction --no-ansi --no-root --only main + +RUN pip install h5py || true + +EXPOSE 8888 + +# Run JupyterLab when the container launches +CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"] \ No newline at end of file diff --git a/docker/Dockerfile.x86 b/docker/Dockerfile.x86 new file mode 100644 index 000000000..370741e73 --- /dev/null +++ b/docker/Dockerfile.x86 @@ -0,0 +1,47 @@ +FROM python:3.10-bullseye + +WORKDIR /app + +RUN apt-get update && apt-get install -y \ + build-essential \ + curl \ + software-properties-common \ + git \ + libatlas-base-dev \ + gfortran \ + pkg-config \ + libfreetype6-dev \ + hdf5-tools \ + libhdf5-dev \ + libhdf5-serial-dev \ + wget \ + && rm -rf /var/lib/apt/lists/* + +RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz && \ + tar -xvzf ta-lib-0.4.0-src.tar.gz && \ + cd ta-lib/ && \ + ./configure --prefix=/usr && \ + make && \ + make install && \ + cd .. && \ + rm -rf ta-lib-0.4.0-src.tar.gz ta-lib/ + +ENV LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH +ENV TA_LIBRARY_PATH=/usr/lib +ENV TA_INCLUDE_PATH=/usr/include + +RUN curl -sSL https://install.python-poetry.org | python3 - + +ENV PATH="${PATH}:/root/.local/bin" + +COPY pyproject.toml poetry.lock* ./ + +RUN poetry config virtualenvs.create false \ + && poetry install --no-interaction --no-ansi --no-root --only main + +RUN pip install h5py || true + +EXPOSE 8888 + +# Run JupyterLab when the container launches +CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"] \ No newline at end of file diff --git a/installation/macosx/ml4t.yml b/installation/macosx/ml4t.yml index 289fdb967..1a60c8480 100644 --- a/installation/macosx/ml4t.yml +++ b/installation/macosx/ml4t.yml @@ -1,502 +1,234 @@ name: ml4t channels: - - powerai - - fastai - - ranaroussi - - bashtage - - ml4t - conda-forge - defaults - - anaconda dependencies: - - _py-xgboost-mutex=2.0 - - abseil-cpp=20200923.3 - - absl-py=0.12.0 - - aiohttp=3.7.4 - - alembic=1.5.8 - - alphalens-reloaded=0.4.1.post1 - - anyio=2.2.0 - - appdirs=1.4.4 - - appnope=0.1.2 - - arch=4.15 - - argon2-cffi=20.1.0 - - arrow-cpp=3.0.0 - - arviz=0.11.2 - - astor=0.8.1 - - astunparse=1.6.3 - - async-timeout=3.0.1 - - async_generator=1.10 - - atk-1.0=2.36.0 - - attrs=20.3.0 - - automat=20.2.0 - - autopep8=1.5.6 - - aws-c-cal=0.4.5 - - aws-c-common=0.5.2 - - aws-c-event-stream=0.2.7 - - aws-c-io=0.9.1 - - aws-checksums=0.1.11 - - aws-sdk-cpp=1.8.151 - - babel=2.9.0 - - backcall=0.2.0 - - backports=1.0 - - backports.functools_lru_cache=1.6.4 - - bcolz-zipline=1.2.3 - - bcrypt=3.2.0 - - beautifulsoup4=4.9.3 - - bleach=3.3.0 - - blinker=1.4 - - blosc=1.21.0 - - bokeh=2.3.1 - - boto=2.49.0 - - boto3=1.17.57 - - botocore=1.20.57 - - bottleneck=1.3.2 - - box2d-py=2.3.8 - - bqplot=0.12.26 - - brotli=1.0.9 - - brotlipy=0.7.0 - - brunsli=0.1 - - bz2file=0.98 - - bzip2=1.0.8 - - c-ares=1.17.1 - - ca-certificates=2021.4.13 - - cachetools=4.2.1 - - cairo=1.16.0 - - catalogue=2.0.3 - - catboost=0.25.1 - - cctools_osx-64=949.0.1 - - certifi=2020.12.5 - - cffi=1.14.5 - - cftime=1.4.1 - - chardet=4.0.0 - - charls=2.2.0 - - clang=11.1.0 - - clang-11=11.1.0 - - clang_osx-64=11.1.0 - - clangxx=11.1.0 - - clangxx_osx-64=11.1.0 - - click=7.1.2 - - cloudpickle=1.6.0 - - colorama=0.4.4 - - colorlover=0.3.0 - - compiler-rt=11.1.0 - - compiler-rt_osx-64=11.1.0 - - conda=4.10.1 - - conda-package-handling=1.7.3 - - constantly=15.1.0 - - cryptography=3.4.7 - - cssselect=1.1.0 - - curl=7.76.1 - - cycler=0.10.0 - - cymem=2.0.5 - - cython=0.29.23 - - cython-blis=0.7.4 - - cytoolz=0.11.0 - - dask-core=2021.4.1 - - dataclasses=0.8 - - dbus=1.13.18 - - decorator=4.4.2 - - defusedxml=0.7.1 - - deprecation=2.1.0 - - dill=0.3.3 - - empyrical=0.5.5 - - empyrical-reloaded=0.5.7 - - entrypoints=0.3 - - expat=2.3.0 - - fastprogress=1.0.0 - - ffmpeg=4.3.1 - - filelock=3.0.12 - - font-ttf-dejavu-sans-mono=2.37 - - font-ttf-inconsolata=2.001 - - font-ttf-source-code-pro=2.030 - - font-ttf-ubuntu=0.83 - - fontconfig=2.13.1 - - fonts-conda-ecosystem=1 - - fonts-conda-forge=1 - - freetype=2.10.4 - - fribidi=1.0.10 - - fsspec=2021.4.0 - - funcy=1.15 - - future=0.18.2 - - gast=0.3.3 - - gdk-pixbuf=2.42.6 - - gensim=4.0.1 - - gettext=0.21.0 - - gflags=2.2.2 - - giflib=5.2.1 - - glib=2.68.1 - - glib-tools=2.68.1 - - glog=0.4.0 - - gmp=6.2.1 - - gmpy2=2.1.0b1 - - gnutls=3.6.15 - - google-api-core=1.26.2 - - google-auth=1.29.0 - - google-auth-oauthlib=0.4.1 - - google-cloud-core=1.6.0 - - google-cloud-storage=1.31.2 - - google-crc32c=1.1.2 - - google-pasta=0.2.0 - - google-resumable-media=1.2.0 - - googleapis-common-protos=1.53.0 - - graphite2=1.3.14 - - graphviz=2.47.1 - - greenlet=1.0.0 - - grpc-cpp=1.36.4 - - grpcio=1.36.1 - - gtk2=2.24.33 - - gts=0.7.6 - - gym=0.18.0 - - gym-box2d=0.18.0 - - h2=3.2.0 - - h5py=2.10.0 - - harfbuzz=2.8.0 - - hdbscan=0.8.27 - - hdf4=4.2.13 - - hdf5=1.10.6 - - hpack=3.0.0 - - html5lib=1.1 - - hyperframe=5.2.0 - - hyperlink=21.0.0 - - icu=68.1 - - idna=2.10 - - imagecodecs=2021.3.31 - - imageio=2.9.0 - - importlib-metadata=4.0.1 - - importlib_metadata=4.0.1 - - incremental=17.5.0 - - inflection=0.5.1 - - intervaltree=3.1.0 - - ipydatawidgets=4.2.0 - - ipykernel=5.5.3 - - ipython=7.22.0 - - ipython_genutils=0.2.0 - - ipyvolume=0.6.0a8 - - ipywebrtc=0.6.0 - - ipywidgets=7.6.3 - - iso3166=1.0.1 - - iso4217=1.6.20180829 - - itemadapter=0.2.0 - - itemloaders=1.0.4 - - jax=0.2.12 - - jaxlib=0.1.65 - - jedi=0.18.0 - - jellyfish=0.8.2 - - jinja2=2.11.3 - - jmespath=0.10.0 - - joblib=1.0.1 - - jpeg=9d - - json5=0.9.5 - - jsonschema=3.2.0 - - jupyter=1.0.0 - - jupyter-packaging=0.9.2 - - jupyter_client=6.1.12 - - jupyter_console=6.4.0 - - jupyter_contrib_core=0.3.3 - - jupyter_contrib_nbextensions=0.5.1 - - jupyter_core=4.7.1 - - jupyter_highlight_selected_word=0.2.0 - - jupyter_latex_envs=1.4.6 - - jupyter_nbextensions_configurator=0.4.1 - - jupyter_server=1.6.4 - - jupyterlab=3.0.14 - - jupyterlab_pygments=0.1.2 - - jupyterlab_server=2.4.0 - - jupyterlab_widgets=1.0.0 - - jxrlib=1.1 - - keras-preprocessing=1.1.2 - - kiwisolver=1.3.1 - - krb5=1.17.2 - - lame=3.100 - - lcms2=2.12 - - ld64_osx-64=530 - - ldid=2.1.2 - - lerc=2.2.1 - - libaec=1.0.4 - - libblas=3.9.0 - - libcblas=3.9.0 - - libclang=11.1.0 - - libclang-cpp11.1=11.1.0 - - libcrc32c=1.1.1 - - libcurl=7.76.1 - - libcxx=11.1.0 - - libdeflate=1.7 - - libedit=3.1.20210216 - - libev=4.33 - - libevent=2.1.10 - - libffi=3.3 - - libgd=2.3.2 - - libgfortran=5.0.0 - - libgfortran5=9.3.0 - - libglib=2.68.1 - - libgpuarray=0.7.6 - - libiconv=1.16 - - libidn2=2.3.0 - - liblapack=3.9.0 - - libllvm10=10.0.1 - - libllvm11=11.1.0 - - libnetcdf=4.8.0 - - libnghttp2=1.43.0 - - libpng=1.6.37 - - libpq=13.2 - - libprotobuf=3.15.8 - - librsvg=2.50.3 - - libsodium=1.0.18 - - libssh2=1.9.0 - - libtasn1=4.16.0 - - libthrift=0.14.1 - - libtiff=4.2.0 - - libtool=2.4.6 - - libunistring=0.9.10 - - libutf8proc=2.6.1 - - libwebp=1.2.0 - - libwebp-base=1.2.0 - - libxgboost=1.3.3 - - libxml2=2.9.10 - - libxslt=1.1.33 - - libzip=1.7.3 - - libzopfli=1.0.3 - - lightgbm=3.2.1 - - linearmodels=4.24 - - llvm-openmp=11.1.0 - - llvm-tools=11.1.0 - - llvmlite=0.36.0 - - locket=0.2.1 - - logbook=1.5.3 - - lru-dict=1.1.6 - - lxml=4.6.3 - - lz4-c=1.9.3 - - mako=1.1.4 - - markdown=3.3.4 - - markupsafe=1.1.1 - - matplotlib=3.4.1 - - matplotlib-base=3.4.1 - - mistune=0.8.4 - - mkl=2020.4 - - mkl-service=2.3.0 - - mock=4.0.3 - - more-itertools=8.7.0 - - mpc=1.1.0 - - mpfr=4.0.2 - - mplfinance=0.12.7a17 - - mpmath=1.2.1 - - multidict=5.1.0 - - multipledispatch=0.6.0 - - multitasking=0.0.9 - - murmurhash=1.0.5 - - mypy_extensions=0.4.3 - - mysql-common=8.0.23 - - mysql-libs=8.0.23 - - nb_conda=2.2.1 - - nb_conda_kernels=2.3.1 - - nbclassic=0.2.7 - - nbclient=0.5.3 - - nbconvert=6.0.7 - - nbformat=5.1.3 - - ncurses=6.2 - - nest-asyncio=1.5.1 - - netcdf4=1.5.6 - - nettle=3.7.2 - - networkx=2.5.1 - - ninja=1.10.2 - - nltk=3.6.2 - - notebook=6.3.0 - - nspr=4.30 - - nss=3.64 - - numba=0.53.1 - - numexpr=2.7.3 - - numpy=1.20.2 - - oauthlib=3.1.0 - - olefile=0.46 - - opencv-python-headless=4.5.1.48 - - openh264=2.1.1 - - openjpeg=2.4.0 - - openssl=1.1.1k - - opt_einsum=3.3.0 - - orc=1.6.7 - - packaging=20.9 - - pandas=1.2.4 - - pandas-datareader=0.9.0 - - pandoc=2.13 - - pandocfilters=1.4.3 - - pango=1.42.4 - - parquet-cpp=1.5.1 - - parsel=1.6.0 - - parso=0.8.2 - - partd=1.2.0 - - pathy=0.5.2 - - patsy=0.5.1 - - pcre=8.44 - - pexpect=4.8.0 - - pickleshare=0.7.5 - - pillow=8.2.0 - - pip=21.1 - - pixman=0.40.0 - - plotly=4.14.3 - - pooch=1.3.0 - - preshed=3.0.5 - - priority=1.3.0 - - prometheus_client=0.10.1 - - promise=2.3 - - prompt-toolkit=3.0.18 - - prompt_toolkit=3.0.18 - - property-cached=1.6.4 - - property_cached=1.6.4 - - protego=0.1.16 - - protobuf=3.15.8 - - ptyprocess=0.7.0 - - py-xgboost=1.3.3 - - pyarrow=3.0.0 - - pyasn1=0.4.8 - - pyasn1-modules=0.2.8 - - pycodestyle=2.7.0 - - pycosat=0.6.3 - - pycparser=2.20 - - pydantic=1.7.3 - - pydispatcher=2.0.5 - - pydot=1.4.2 - - pyfolio-reloaded=0.9.3 - - pyglet=1.5.16 - - pygments=2.8.1 - - pygpu=0.7.6 - - pyhamcrest=2.0.2 - - pyjwt=2.0.1 - - pykalman=0.9.5 - - pyldavis=3.3.1 - - pymc3=3.11.2 - - pynndescent=0.5.2 - - pyopenssl=20.0.1 - - pyparsing=2.4.7 - - pyphen=0.10.0 - - pyqt=5.12.3 - - pyqt-impl=5.12.3 - - pyqt5-sip=4.19.18 - - pyqtchart=5.12 - - pyqtwebengine=5.12.1 - - pyrsistent=0.17.3 - - pysocks=1.7.1 - - pytables=3.6.1 - - python=3.8.8 - - python-dateutil=2.8.1 - - python-editor=1.0.4 - - python-flatbuffers=1.12 - - python-graphviz=0.16 - - python-interface=1.6.0 - - python_abi=3.8 - - pythreejs=2.3.0 - - pytorch=1.8.0 - - pytz=2021.1 - - pywavelets=1.1.1 - - pyyaml=5.4.1 - - pyzmq=22.0.3 - - qt=5.12.9 - - qtconsole=5.0.3 - - qtpy=1.9.0 - - quandl=3.6.1 - - queuelib=1.6.1 - - re2=2021.04.01 - - readline=8.1 - - regex=2021.4.4 - - requests=2.25.1 - - requests-oauthlib=1.3.0 - - retrying=1.3.3 - - rsa=4.7.2 - - ruamel_yaml=0.15.100 - - s3transfer=0.4.2 - - scikit-image=0.18.1 - - scikit-learn=0.24.1 - - scipy=1.6.2 - - scrapy=2.5.0 - - seaborn=0.11.1 - - seaborn-base=0.11.1 - - semver=2.13.0 - - send2trash=1.5.0 - - service_identity=18.1.0 - - setuptools=52.0.0 - - shap=0.37.0 - - shellingham=1.4.0 - - six=1.15.0 - - sleef=3.5.1 - - slicer=0.0.7 - - smart_open=2.2.1 - - snappy=1.1.8 - - sniffio=1.2.0 - - sortedcontainers=2.3.0 - - soupsieve=2.2.1 - - spacy=3.0.6 - - spacy-legacy=3.0.5 - - sqlalchemy=1.4.11 - - sqlite=3.35.5 - - srsly=2.4.1 - - statsmodels=0.12.2 - - sympy=1.8 - - ta-lib=0.4.19 - - tapi=1100.0.11 - - tbb=2020.3 - - tensorboard=2.4.1 - - tensorboard-plugin-wit=1.8.0 - - tensorflow=2.4.0 - - tensorflow-base=2.4.0 - - tensorflow-datasets=3.1.0 - - tensorflow-estimator=2.4.0 - - tensorflow-metadata=0.14.0 - - termcolor=1.1.0 - - terminado=0.9.4 - - testpath=0.4.4 - - textacy=0.11.0 - - textblob=0.15.3 - - theano-pymc=1.1.2 - - thinc=8.0.3 - - threadpoolctl=2.1.0 - - tifffile=2021.4.8 - - tk=8.6.10 - - toml=0.10.2 - - tomlkit=0.7.0 - - toolz=0.11.1 - - tornado=6.1 - - tqdm=4.60.0 - - trading-calendars=2.1.1 - - traitlets=5.0.5 - - traittypes=0.2.1 - - twisted=21.2.0 - - typer=0.3.2 - - typing-extensions=3.7.4.3 - - typing_extensions=3.7.4.3 - - umap-learn=0.5.1 - - urllib3=1.26.4 - - w3lib=1.22.0 - - wasabi=0.8.2 - - wcwidth=0.2.5 - - webencodings=0.5.1 - - werkzeug=1.0.1 - - wheel=0.36.2 - - widgetsnbextension=3.5.1 - - wordcloud=1.8.1 - - wrapt=1.12.1 - - x264=1!152.20180806 - - xarray=0.17.0 - - xgboost=1.3.3 - - xlrd=2.0.1 - - xz=5.2.5 - - yaml=0.2.5 - - yarl=1.6.3 - - yellowbrick=1.3.post1 - - yfinance=0.1.59 - - zeromq=4.3.4 - - zfp=0.5.5 - - zipline-reloaded=2.0.0rc4 - - zipp=3.4.1 - - zlib=1.2.11 - - zope.interface=5.4.0 - - zstd=1.4.9 + - anyio=4.4.0=pyhd8ed1ab_0 + - appnope=0.1.4=pyhd8ed1ab_0 + - argon2-cffi=23.1.0=pyhd8ed1ab_0 + - argon2-cffi-bindings=21.2.0=py310h2aa6e3c_4 + - arrow=1.3.0=pyhd8ed1ab_0 + - asttokens=2.4.1=pyhd8ed1ab_0 + - async-lru=2.0.4=pyhd8ed1ab_0 + - attrs=24.2.0=pyh71513ae_0 + - babel=2.14.0=pyhd8ed1ab_0 + - beautifulsoup4=4.12.3=pyha770c72_0 + - bleach=6.1.0=pyhd8ed1ab_0 + - blosc=1.21.6=h5499902_0 + - brotli-python=1.1.0=py310h1253130_1 + - bzip2=1.0.8=h99b78c6_7 + - c-ares=1.32.3=h99b78c6_0 + - c-blosc2=2.15.1=h5063078_0 + - ca-certificates=2024.7.4=hf0a4a13_0 + - cached-property=1.5.2=hd8ed1ab_1 + - cached_property=1.5.2=pyha770c72_1 + - certifi=2024.7.4=pyhd8ed1ab_0 + - cffi=1.17.0=py310hf7f7c9b_0 + - charset-normalizer=3.3.2=pyhd8ed1ab_0 + - comm=0.2.2=pyhd8ed1ab_0 + - debugpy=1.8.5=py310hcf9f62a_0 + - decorator=5.1.1=pyhd8ed1ab_0 + - defusedxml=0.7.1=pyhd8ed1ab_0 + - entrypoints=0.4=pyhd8ed1ab_0 + - exceptiongroup=1.2.2=pyhd8ed1ab_0 + - executing=2.0.1=pyhd8ed1ab_0 + - fqdn=1.5.1=pyhd8ed1ab_0 + - h11=0.14.0=pyhd8ed1ab_0 + - h2=4.1.0=pyhd8ed1ab_0 + - hdf5=1.14.3=nompi_hec07895_105 + - hpack=4.0.0=pyh9f0ad1d_0 + - httpcore=1.0.5=pyhd8ed1ab_0 + - httpx=0.27.0=pyhd8ed1ab_0 + - hyperframe=6.0.1=pyhd8ed1ab_0 + - idna=3.7=pyhd8ed1ab_0 + - importlib-metadata=8.2.0=pyha770c72_0 + - importlib_metadata=8.2.0=hd8ed1ab_0 + - importlib_resources=6.4.0=pyhd8ed1ab_0 + - ipykernel=6.29.5=pyh57ce528_0 + - ipython=8.26.0=pyh707e725_0 + - ipywidgets=8.1.3=pyhd8ed1ab_0 + - isoduration=20.11.0=pyhd8ed1ab_0 + - jedi=0.19.1=pyhd8ed1ab_0 + - jinja2=3.1.4=pyhd8ed1ab_0 + - joblib=1.4.2=pyhd8ed1ab_0 + - json5=0.9.25=pyhd8ed1ab_0 + - jsonpointer=3.0.0=py310hbe9552e_0 + - jsonschema=4.23.0=pyhd8ed1ab_0 + - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0 + - jsonschema-with-format-nongpl=4.23.0=hd8ed1ab_0 + - jupyter-lsp=2.2.5=pyhd8ed1ab_0 + - jupyter_client=8.6.2=pyhd8ed1ab_0 + - jupyter_core=5.7.2=py310hbe9552e_0 + - jupyter_events=0.10.0=pyhd8ed1ab_0 + - jupyter_server=2.14.2=pyhd8ed1ab_0 + - jupyter_server_terminals=0.5.3=pyhd8ed1ab_0 + - jupyterlab=4.2.4=pyhd8ed1ab_0 + - jupyterlab_pygments=0.3.0=pyhd8ed1ab_1 + - jupyterlab_server=2.27.3=pyhd8ed1ab_0 + - jupyterlab_widgets=3.0.11=pyhd8ed1ab_0 + - krb5=1.21.3=h237132a_0 + - libaec=1.1.3=hebf3989_0 + - libblas=3.9.0=23_osxarm64_openblas + - libcblas=3.9.0=23_osxarm64_openblas + - libcurl=8.9.1=hfd8ffcc_0 + - libcxx=18.1.8=h5a72898_2 + - libedit=3.1.20191231=hc8eb9b7_2 + - libev=4.33=h93a5062_2 + - libffi=3.4.2=h3422bc3_5 + - libgfortran=5.0.0=13_2_0_hd922786_3 + - libgfortran5=13.2.0=hf226fd6_3 + - liblapack=3.9.0=23_osxarm64_openblas + - libnghttp2=1.58.0=ha4dd798_1 + - libopenblas=0.3.27=openmp_h517c56d_1 + - libsodium=1.0.18=h27ca646_1 + - libsqlite=3.46.0=hfb93653_0 + - libssh2=1.11.0=h7a5bd25_0 + - libta-lib=0.4.0=hb547adb_2 + - libzlib=1.3.1=hfb2fe0b_1 + - llvm-openmp=18.1.8=hde57baf_0 + - lz4-c=1.9.4=hb7217d7_0 + - markupsafe=2.1.5=py310hd125d64_0 + - matplotlib-inline=0.1.7=pyhd8ed1ab_0 + - mistune=3.0.2=pyhd8ed1ab_0 + - nbclient=0.10.0=pyhd8ed1ab_0 + - nbconvert-core=7.16.4=pyhd8ed1ab_1 + - nbformat=5.10.4=pyhd8ed1ab_0 + - ncurses=6.5=hb89a1cb_0 + - nest-asyncio=1.6.0=pyhd8ed1ab_0 + - notebook-shim=0.2.4=pyhd8ed1ab_0 + - numexpr=2.10.0=py310h2216879_0 + - numpy=1.26.4=py310hd45542a_0 + - openssl=3.3.1=hfb2fe0b_2 + - overrides=7.7.0=pyhd8ed1ab_0 + - packaging=24.1=pyhd8ed1ab_0 + - pandocfilters=1.5.0=pyhd8ed1ab_0 + - parso=0.8.4=pyhd8ed1ab_0 + - pexpect=4.9.0=pyhd8ed1ab_0 + - pickleshare=0.7.5=py_1003 + - pip=24.2=pyhd8ed1ab_0 + - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1 + - platformdirs=4.2.2=pyhd8ed1ab_0 + - prometheus_client=0.20.0=pyhd8ed1ab_0 + - prompt-toolkit=3.0.47=pyha770c72_0 + - psutil=6.0.0=py310ha6dd24b_0 + - ptyprocess=0.7.0=pyhd3deb0d_0 + - pure_eval=0.2.3=pyhd8ed1ab_0 + - py-cpuinfo=9.0.0=pyhd8ed1ab_0 + - pycparser=2.22=pyhd8ed1ab_0 + - pygments=2.18.0=pyhd8ed1ab_0 + - pyobjc-core=10.3.1=py310h4b7648a_0 + - pyobjc-framework-cocoa=10.3.1=py310h4b7648a_0 + - pysocks=1.7.1=pyha2e5f31_6 + - pytables=3.9.2=py310h5a530ad_3 + - python=3.10.14=h2469fbe_0_cpython + - python-fastjsonschema=2.20.0=pyhd8ed1ab_0 + - python-json-logger=2.0.7=pyhd8ed1ab_0 + - python-tzdata=2024.1=pyhd8ed1ab_0 + - python_abi=3.10=4_cp310 + - pytz=2024.1=pyhd8ed1ab_0 + - pyyaml=6.0.2=py310ha6dd24b_0 + - pyzmq=26.1.0=py310h16e08c9_0 + - readline=8.2=h92ec313_1 + - referencing=0.35.1=pyhd8ed1ab_0 + - requests=2.32.3=pyhd8ed1ab_0 + - rfc3339-validator=0.1.4=pyhd8ed1ab_0 + - rfc3986-validator=0.1.1=pyh9f0ad1d_0 + - rpds-py=0.20.0=py310h947b723_0 + - scikit-learn=1.5.1=py310h64e73be_0 + - scipy=1.14.0=py310h7057308_1 + - send2trash=1.8.3=pyh31c8845_0 + - setuptools=72.1.0=pyhd8ed1ab_0 + - six=1.16.0=pyh6c4a22f_0 + - snappy=1.2.1=hd02b534_0 + - sniffio=1.3.1=pyhd8ed1ab_0 + - soupsieve=2.5=pyhd8ed1ab_1 + - stack_data=0.6.2=pyhd8ed1ab_0 + - ta-lib=0.4.32=py310h1cdde8b_0 + - terminado=0.18.1=pyh31c8845_0 + - threadpoolctl=3.5.0=pyhc1e730c_0 + - tinycss2=1.3.0=pyhd8ed1ab_0 + - tk=8.6.13=h5083fa2_1 + - tomli=2.0.1=pyhd8ed1ab_0 + - toolz=0.12.1=pyhd8ed1ab_0 + - tornado=6.4.1=py310ha6dd24b_0 + - trading-calendars=2.1.1=pyhd3deb0d_0 + - traitlets=5.14.3=pyhd8ed1ab_0 + - types-python-dateutil=2.9.0.20240316=pyhd8ed1ab_0 + - typing-extensions=4.12.2=hd8ed1ab_0 + - typing_extensions=4.12.2=pyha770c72_0 + - typing_utils=0.1.0=pyhd8ed1ab_0 + - tzdata=2024a=h0c530f3_0 + - uri-template=1.3.0=pyhd8ed1ab_0 + - urllib3=2.2.2=pyhd8ed1ab_1 + - wcwidth=0.2.13=pyhd8ed1ab_0 + - webcolors=24.8.0=pyhd8ed1ab_0 + - webencodings=0.5.1=pyhd8ed1ab_2 + - websocket-client=1.8.0=pyhd8ed1ab_0 + - wheel=0.44.0=pyhd8ed1ab_0 + - widgetsnbextension=4.0.11=pyhd8ed1ab_0 + - xz=5.2.6=h57fd34a_0 + - yaml=0.2.5=h3422bc3_2 + - zeromq=4.3.5=hcc0f68c_4 + - zipp=3.19.2=pyhd8ed1ab_0 + - zlib-ng=2.2.1=h00cdb27_0 + - zstandard=0.23.0=py310hd9c37c8_0 + - zstd=1.5.6=hb46c0d2_0 - pip: - - backtrader==1.9.76.123 - - cvxpy==1.1.12 - - ecos==2.0.7.post1 - - livelossplot==0.5.4 - - osqp==0.6.2.post0 - - pymdptoolbox==4.0b3 - - pyportfolioopt==1.4.1 - - qdldl==0.1.5.post0 - - scs==2.1.3 -prefix: /Users/marianafranco/.pyenv/versions/miniconda3-latest/envs/ml4t + - alembic==1.13.2 + - alphalens-reloaded==0.4.4 + - bcolz-zipline==1.2.9 + - black==24.8.0 + - bottleneck==1.4.0 + - clarabel==0.9.0 + - click==8.1.7 + - colorama==0.4.6 + - contourpy==1.2.1 + - cvxpy==1.5.2 + - cycler==0.12.1 + - ecos==2.0.14 + - empyrical==0.5.5 + - empyrical-reloaded==0.5.10 + - exchange-calendars==4.5.5 + - fonttools==4.53.1 + - h5py==3.11.0 + - inflection==0.5.1 + - intervaltree==3.1.0 + - iso3166==2.1.1 + - iso4217==1.12.20240625 + - kiwisolver==1.4.5 + - korean-lunar-calendar==0.3.1 + - logbook==1.7.0.post0 + - lru-dict==1.3.0 + - lxml==5.3.0 + - mako==1.3.5 + - matplotlib==3.6.3 + - more-itertools==10.4.0 + - mpmath==1.3.0 + - multipledispatch==1.0.0 + - mypy-extensions==1.0.0 + - nbcommands==0.5.1 + - networkx==3.3 + - osqp==0.6.7.post1 + - pandas==1.5.3 + - pandas-datareader==0.10.0 + - pathspec==0.12.1 + - patsy==0.5.6 + - peewee==3.17.3 + - pillow==10.4.0 + - pyfolio-reloaded==0.9.7 + - pyluach==2.2.0 + - pyparsing==3.1.2 + - pyportfolioopt==1.5.5 + - python-dateutil==2.9.0.post0 + - python-interface==1.6.1 + - qdldl==0.1.7.post4 + - quandl==3.7.0 + - scs==3.2.6 + - seaborn==0.13.2 + - sortedcontainers==2.4.0 + - sqlalchemy==2.0.32 + - statsmodels==0.14.2 + - sympy==1.13.2 + - yellowbrick==1.5 + - zipline-reloaded==3.0.4 +prefix: /Users/bread/opt/anaconda3/envs/ml4t diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..492b38a67 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,187 @@ +[tool.poetry] +name = "ml4t-project" +version = "0.1.0" +description = "Machine Learning for Trading project" +authors = ["0xrushi"] + +[tool.poetry.dependencies] +python = ">=3.10,<3.13" +anyio = "4.4.0" +appnope = "0.1.4" +argon2-cffi = "23.1.0" +argon2-cffi-bindings = "21.2.0" +arrow = "1.3.0" +asttokens = "2.4.1" +async-lru = "2.0.4" +attrs = "24.2.0" +babel = "2.14.0" +beautifulsoup4 = "4.12.3" +bleach = "6.1.0" +cached-property = "1.5.2" +certifi = "2024.7.4" +cffi = "1.17.0" +charset-normalizer = "3.3.2" +comm = "0.2.2" +debugpy = "1.8.5" +decorator = "5.1.1" +defusedxml = "0.7.1" +entrypoints = "0.4" +exceptiongroup = "1.2.2" +executing = "2.0.1" +fqdn = "1.5.1" +h11 = "0.14.0" +h2 = "4.1.0" +httpcore = "1.0.5" +httpx = "0.27.0" +hpack = "4.0.0" +hyperframe = "6.0.1" +idna = "3.7" +importlib-metadata = "8.2.0" +importlib_resources = "6.4.0" +ipykernel = "6.29.5" +ipython = "8.26.0" +ipywidgets = "8.1.3" +isoduration = "20.11.0" +jedi = "0.19.1" +jinja2 = "3.1.4" +joblib = "1.4.2" +json5 = "0.9.25" +jsonpointer = "3.0.0" +jsonschema = "4.23.0" +jsonschema-specifications = "2023.12.1" +jupyter-lsp = "2.2.5" +jupyter_client = "8.6.2" +jupyter_core = "5.7.2" +jupyter_events = "0.10.0" +jupyter_server = "2.14.2" +jupyter_server_terminals = "0.5.3" +jupyterlab = "4.2.4" +jupyterlab_pygments = "0.3.0" +jupyterlab_server = "2.27.3" +jupyterlab_widgets = "3.0.11" +markupsafe = "2.1.5" +matplotlib-inline = "0.1.7" +mistune = "3.0.2" +nbclient = "0.10.0" +nbformat = "5.10.4" +nest-asyncio = "1.6.0" +notebook-shim = "0.2.4" +numexpr = "2.10.0" +numpy = "1.26.4" +overrides = "7.7.0" +packaging = "24.1" +pandocfilters = "1.5.0" +parso = "0.8.4" +pexpect = "4.9.0" +pickleshare = "0.7.5" +platformdirs = "4.2.2" +prometheus_client = "0.20.0" +prompt-toolkit = "3.0.47" +psutil = "6.0.0" +ptyprocess = "0.7.0" +pure_eval = "0.2.3" +py-cpuinfo = "9.0.0" +pycparser = "2.22" +pygments = "2.18.0" +pysocks = "1.7.1" +python-json-logger = "2.0.7" +pytz = "2024.1" +pyyaml = "6.0.2" +pyzmq = "26.1.0" +referencing = "0.35.1" +requests = "2.32.3" +rfc3339-validator = "0.1.4" +rfc3986-validator = "0.1.1" +rpds-py = "0.20.0" +scikit-learn = "1.5.1" +scipy = "1.14.0" +send2trash = "1.8.3" +six = "1.16.0" +sniffio = "1.3.1" +soupsieve = "2.5" +stack_data = "0.6.2" +ta-lib = "0.4.32" +terminado = "0.18.1" +threadpoolctl = "3.5.0" +tinycss2 = "1.3.0" +tomli = "2.0.1" +toolz = "0.12.1" +tornado = "6.4.1" +trading-calendars = "2.1.1" +traitlets = "5.14.3" +types-python-dateutil = "2.9.0.20240316" +typing-extensions = "4.12.2" +typing_utils = "0.1.0" +uri-template = "1.3.0" +urllib3 = "2.2.2" +wcwidth = "0.2.13" +webcolors = "24.8.0" +webencodings = "0.5.1" +websocket-client = "1.8.0" +widgetsnbextension = "4.0.11" +zipp = "3.19.2" +zstandard = "0.23.0" +alembic = "1.13.2" +alphalens-reloaded = "0.4.4" +bcolz-zipline = "1.2.9" +black = "24.8.0" +bottleneck = "1.4.0" +clarabel = "0.9.0" +click = "8.1.7" +colorama = "0.4.6" +contourpy = "1.2.1" +cvxpy = "1.5.2" +cycler = "0.12.1" +ecos = "2.0.14" +empyrical = "0.5.5" +empyrical-reloaded = "0.5.10" +exchange-calendars = "4.5.5" +fonttools = "4.53.1" +h5py = "3.11.0" +inflection = "0.5.1" +intervaltree = "3.1.0" +iso3166 = "2.1.1" +iso4217 = "1.12.20240625" +kiwisolver = "1.4.5" +korean-lunar-calendar = "0.3.1" +logbook = "1.7.0.post0" +lru-dict = "1.3.0" +lxml = "5.3.0" +mako = "1.3.5" +matplotlib = "3.6.3" +more-itertools = "10.4.0" +mpmath = "1.3.0" +multipledispatch = "1.0.0" +mypy-extensions = "1.0.0" +nbcommands = "0.5.1" +networkx = "3.3" +osqp = "0.6.7.post1" +pandas = "1.5.3" +pandas-datareader = "0.10.0" +pathspec = "0.12.1" +patsy = "0.5.6" +peewee = "3.17.3" +pillow = "10.4.0" +pyfolio-reloaded = "0.9.7" +pyluach = "2.2.0" +pyparsing = "3.1.2" +pyportfolioopt = "1.5.5" +python-dateutil = "2.9.0.post0" +python-interface = "1.6.1" +qdldl = "0.1.7.post4" +quandl = "3.7.0" +scs = "3.2.6" +seaborn = "0.13.2" +sortedcontainers = "2.4.0" +sqlalchemy = "2.0.32" +statsmodels = "0.14.2" +sympy = "1.13.2" +yellowbrick = "1.5" +zipline-reloaded = "3.0.4" + +[tool.poetry.extras] +all = [] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" \ No newline at end of file From 21fbce33c02a91aa6ab34823885a0638bbad12e6 Mon Sep 17 00:00:00 2001 From: 0xrushi Date: Thu, 15 Aug 2024 00:49:56 -0400 Subject: [PATCH 2/5] readme update --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 8bf0dd8b6..9689ce24f 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,16 @@ The code examples rely on a wide range of Python libraries from the data science It is not necessary to try and install all libraries at once because this increases the likeliihood of encountering version conflicts. Instead, we recommend that you install the libraries required for a specific chapter as you go along. +> As of August 2024, the `ml4t` channel is no longer available in conda. To begin, please use the provided dockerfile instead. The pyproject.toml file has been verified to work with poetry on conda python version 3.10 and 3.11 locally without docker. + +``` +docker build -t ml4t-project -f docker/Dockerfile.applesilicon . +``` + +``` +docker run -p 8888:8888 -e QUANDL_API_KEY=yourkey -v $(pwd):/app ml4t-project +``` + > Update March 2022: `zipline-reloaded`, `pyfolio-reloaded`, `alphalens-reloaded`, and `empyrical-reloaded` are now available on the `conda-forge` channel. The channel `ml4t` only contains outdated versions and will soon be removed. > Update April 2021: with the update of [Zipline](https://zipline.ml4trading.io), it is no longer necessary to use Docker. The installation instructions now refer to OS-specific environment files that should simplify your running of the notebooks. From 7423b60773fba2e8ccdbfefbaf04db4137e2e834 Mon Sep 17 00:00:00 2001 From: 0xrushi Date: Thu, 15 Aug 2024 00:53:08 -0400 Subject: [PATCH 3/5] readme update --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 9689ce24f..093ef113d 100644 --- a/README.md +++ b/README.md @@ -60,10 +60,16 @@ It is not necessary to try and install all libraries at once because this increa > As of August 2024, the `ml4t` channel is no longer available in conda. To begin, please use the provided dockerfile instead. The pyproject.toml file has been verified to work with poetry on conda python version 3.10 and 3.11 locally without docker. +#### Build docker image on apple silicon ``` docker build -t ml4t-project -f docker/Dockerfile.applesilicon . ``` +#### Build docker image on x86_64 +``` +docker build -t ml4t-project -f docker/Dockerfile.x86 . +``` +#### Run docker image ``` docker run -p 8888:8888 -e QUANDL_API_KEY=yourkey -v $(pwd):/app ml4t-project ``` From fe91a2c747a6073d47943881f2e7932b13de930b Mon Sep 17 00:00:00 2001 From: pastetreee <92103444+pastetreee@users.noreply.github.com> Date: Thu, 15 Aug 2024 08:54:53 -0400 Subject: [PATCH 4/5] readme update --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 093ef113d..4e15373e2 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,11 @@ docker build -t ml4t-project -f docker/Dockerfile.x86 . docker run -p 8888:8888 -e QUANDL_API_KEY=yourkey -v $(pwd):/app ml4t-project ``` +#### Run docker image (on Windows) +``` +docker run -p 8888:8888 -e QUANDL_API_KEY=yourkey -v ${PWD}:/app ml4t-project +``` + > Update March 2022: `zipline-reloaded`, `pyfolio-reloaded`, `alphalens-reloaded`, and `empyrical-reloaded` are now available on the `conda-forge` channel. The channel `ml4t` only contains outdated versions and will soon be removed. > Update April 2021: with the update of [Zipline](https://zipline.ml4trading.io), it is no longer necessary to use Docker. The installation instructions now refer to OS-specific environment files that should simplify your running of the notebooks. From bd4c20176ae3129c54382ce5e31dd63a1e144679 Mon Sep 17 00:00:00 2001 From: 0xrushi Date: Sun, 18 Aug 2024 17:52:53 -0400 Subject: [PATCH 5/5] minor update --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 492b38a67..cf821d5b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ h2 = "4.1.0" httpcore = "1.0.5" httpx = "0.27.0" hpack = "4.0.0" -hyperframe = "6.0.1" +hyperframe = "6.0.0" idna = "3.7" importlib-metadata = "8.2.0" importlib_resources = "6.4.0" @@ -178,6 +178,12 @@ statsmodels = "0.14.2" sympy = "1.13.2" yellowbrick = "1.5" zipline-reloaded = "3.0.4" +backtesting = "^0.3.3" +yfinance = "0.2.41" +lightgbm = "^4.5.0" +mlflow = "^2.15.1" +jupyter = "^1.0.0" +tqdm = "^4.66.5" [tool.poetry.extras] all = []