From 32ff78799614aa62412f498d3af27c092d0f356e Mon Sep 17 00:00:00 2001 From: "Borie, Niels" Date: Thu, 8 Feb 2024 23:13:07 +0100 Subject: [PATCH] :building_construction: create an advanced image for a given input python version --- advanced/Dockerfile | 23 +++++++++++++---------- advanced/environment.yml | 29 ++++++++++++++++------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/advanced/Dockerfile b/advanced/Dockerfile index cb3a134..3da9622 100644 --- a/advanced/Dockerfile +++ b/advanced/Dockerfile @@ -1,15 +1,18 @@ -# Copyright (c) Niels Borie. +ARG PYTHON_VERSION +ARG PYTHON_RELEASE_VERSION +ARG IMAGE_VERSION -FROM nielsborie/base-py39 +FROM nielsborie/machine-learning-environments:base-py${PYTHON_VERSION}-${IMAGE_VERSION} -LABEL maintainer="Niels BORIE" +ARG PYTHON_VERSION +ENV ENV_NAME=py${PYTHON_VERSION} -# --- Install h2o -RUN pip install -f http://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o - -# Create the environment: COPY environment.yml . -RUN mamba env update --name py39 --file environment.yml --prune +RUN mamba env update --name ${ENV_NAME} --file environment.yml --prune + +RUN . /opt/conda/etc/profile.d/conda.sh && \ + conda activate ${ENV_NAME} && \ + pip install -f http://h2o-release.s3.amazonaws.com/h2o/latest_stable_Py.html h2o && \ + conda deactivate -# clean up pip cache -RUN rm -rf /root/.cache/pip/* \ No newline at end of file +RUN rm -rf /root/.cache/pip/* diff --git a/advanced/environment.yml b/advanced/environment.yml index f73d399..fa95467 100644 --- a/advanced/environment.yml +++ b/advanced/environment.yml @@ -1,38 +1,41 @@ -name: py39 channels: - conda-forge + - bioconda + - defaults dependencies: - - pip + # vanilla - xgboost - lightgbm - catboost - mlxtend - - gensim + - scikit-mdr - vowpalwabbit + # interpretability + - shap + - lime + # nlp + - gensim + - spacy + # automl - hyperopt + - optuna + - tpot + # genetic - deap - - update_checker - - tqdm - - stopit - - scikit-mdr - skrebate - - tpot - yellowbrick - - spacy - gplearn - - shap - - lime + # manipulation (dates, GPS, ...) - gpxpy - arrow - haversine - toolz - cytoolz - sacred - - plotly - missingno - - pandas-profiling - pip: - git+https://github.com/nicta/dora.git + - ray[data,train,tune,serve] - tables - sklearn-deap - trueskill