FROM python:3.10 # Install system dependencies for compilation RUN apt-get update && apt-get install -y \ build-essential \ gcc \ g++ \ gfortran \ swig \ && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 user && python -m pip install --upgrade pip USER user ENV PATH="/home/user/.local/bin:$PATH" WORKDIR /app COPY --chown=user ./requirements.txt requirements.txt # Install build dependencies first with compatible versions RUN pip install --no-cache-dir "setuptools<60" "numpy==1.21.6" "Cython<3.0" "scipy>=1.7.0" # Install scikit-learn with relaxed compiler flags for GCC 14 compatibility # GCC 14 treats -Wincompatible-pointer-types as error by default, need to disable it ENV CFLAGS="-Wno-error=incompatible-pointer-types -Wno-error=int-conversion" RUN pip install --no-cache-dir --no-build-isolation "scikit-learn>=0.24.0,<0.25.0" ENV CFLAGS="" # Install auto-sklearn from PyPI (includes automl_common submodule) RUN pip install --no-cache-dir auto-sklearn # Install remaining requirements RUN pip install --no-cache-dir -r requirements.txt COPY --chown=user . /app ENV MCP_TRANSPORT=http ENV MCP_PORT=7860 EXPOSE 7860 CMD ["python", "auto-sklearn/mcp_output/start_mcp.py"]