# Use the official FalkorDB image as the base FROM falkordb/falkordb:latest # Install Python and dependencies USER root RUN apt-get update && apt-get install -y python3 python3-pip python3-venv # Set up a virtual environment to avoid PEP 668 error RUN python3 -m venv /opt/venv ENV PATH="/opt/venv/bin:$PATH" # Set up a working directory WORKDIR /app # Copy the requirements file and install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the application code COPY . . # Use the separate start.sh script RUN chmod +x /app/start.sh # Expose the port used by Hugging Face Spaces EXPOSE 7860 # Reset entrypoint and run the startup script ENTRYPOINT [] CMD ["/app/start.sh"]