Spaces:
Running on Zero
Running on Zero
File size: 531 Bytes
63f2fb8 | 1 2 3 4 5 6 7 8 9 10 11 12 | FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libgl1 libglib2.0-0 libraqm0 && rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
WORKDIR /home/user/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY --chown=user:user . .
USER user
ENV HOME=/home/user PYTHONUNBUFFERED=1 PYTHONPATH=/home/user/app/vendor HF_HOME=/home/user/.cache/huggingface
EXPOSE 7860
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|