FROM python:3.10-slim WORKDIR /app # 1. Install Node.js RUN apt-get update && apt-get install -y curl gnupg RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - RUN apt-get install -y nodejs # 2. Copy Files COPY . /app # 3. Build Frontend WORKDIR /app/frontend RUN npm install RUN npm run build WORKDIR /app # 4. Install Python Backend Dependencies RUN pip install torch transformers peft fastapi uvicorn unsloth[colab-new] # HF Spaces User ID Setup (Optional but recommended) RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR /app # 5. Start Backend (which serves Frontend) CMD ["python", "app/ora_server.py"]