| FROM python:3.10-slim | |
| LABEL maintainer="Jsns82882" | |
| RUN useradd -m -u 1000 appuser | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| git curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Clone the repo | |
| RUN git clone https://github.com/God5aja5/ulp.git /app | |
| # Install app requirements | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Install backup/restore deps | |
| RUN pip install --no-cache-dir huggingface_hub | |
| # Copy our startup wrapper | |
| COPY startup.py /app/startup.py | |
| # Create persistent data dir (uploads + db live here) | |
| RUN mkdir -p /app/data/uploads | |
| # Fix ownership | |
| RUN chown -R 1000:1000 /app | |
| USER 1000 | |
| EXPOSE 7860 | |
| CMD ["python", "startup.py"] |