Spaces:
Sleeping
Sleeping
File size: 1,218 Bytes
c0bc916 0a4014e c0bc916 0a4014e 246cbb4 0a4014e dfa763e 246cbb4 dfa763e 246cbb4 73878d5 246cbb4 c0bc916 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | 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"]
|