FROM python:3.11-slim # System dependencies RUN apt-get update && apt-get install -y \ build-essential \ git \ python3-dev \ libboost-all-dev \ cmake \ && rm -rf /var/lib/apt/lists/* # Install RDKit (official wheels) RUN pip install --upgrade pip && pip install rdkit-pypi # Set workdir WORKDIR /app # Copy code COPY . . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Set environment variables for HuggingFace Spaces ENV PORT=7860 ENV LOG_LEVEL=info ENV ALLOWED_ORIGINS="*" # Expose port for Spaces EXPOSE 7860 # Start FastAPI server (Spaces expects python main.py) CMD ["python", "main.py"]