# 1. Base Image FROM python:3.11-slim # 2. Install Git RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* WORKDIR /app # 3. FETCH PRIVATE CODE # This mounts your HF_TOKEN secret just long enough to clone your private vault RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \ git clone https://user:$(cat /run/secrets/HF_TOKEN)@huggingface.co/spaces/RayNene/SemaLabsVault . # 4. INSTALL & RUN RUN pip install --no-cache-dir -r requirements.txt # Force Gradio/Flask to use the correct port for HF ENV GRADIO_SERVER_NAME="0.0.0.0" ENV GRADIO_SERVER_PORT=7860 EXPOSE 7860 CMD ["python", "app.py"]