Spaces:
Sleeping
Sleeping
| FROM python:3.10 | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 \ | |
| && rm -rf /var/lib/apt/lists/* && git lfs install | |
| RUN pip install --no-cache-dir pip -U | |
| RUN pip install --no-cache-dir datasets "huggingface-hub>=0.30" "hf-transfer>=0.1.4" | |
| # CRITICAL: Install numpy FIRST (pyradiomics needs it at build time) | |
| RUN pip install --no-cache-dir "numpy<2.0" | |
| # Install Keras 3.x and TensorFlow | |
| RUN pip install --no-cache-dir keras==3.7.0 | |
| RUN pip install --no-cache-dir tensorflow-cpu==2.18.0 | |
| # Install pyradiomics separately (needs numpy at build time) | |
| # Use --no-build-isolation to access already-installed numpy | |
| RUN pip install --no-cache-dir --no-build-isolation pyradiomics==3.0.1 SimpleITK pynrrd | |
| COPY requirements.txt /tmp/requirements.txt | |
| COPY constraints.txt /tmp/constraints.txt | |
| RUN pip install --no-cache-dir --constraint /tmp/constraints.txt -r /tmp/requirements.txt | |
| RUN pip install --no-cache-dir --constraint /tmp/constraints.txt gradio | |
| COPY . /app | |
| RUN mkdir -p /app/modelos | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| ENV GRADIO_SERVER_PORT=7860 | |
| CMD ["python", "app.py"] |