Spaces:
Sleeping
Sleeping
File size: 777 Bytes
caf8059 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | FROM python:3.12-slim-bookworm@sha256:57d96f71de145a98e7ceca18ee4ade77bba4103a33a72dfaea026b23625c6bf0
RUN apt-get update && apt-get install -y --no-install-recommends qemu-system-x86 ca-certificates && rm -rf /var/lib/apt/lists/*
WORKDIR /home/user/app
COPY requirements-runtime.txt ./
RUN pip install --no-cache-dir -r requirements-runtime.txt
RUN useradd --uid 1000 --create-home user
COPY --chown=1000:1000 . /home/user/app
RUN mkdir -p .local/tools/qemu && ln -s /usr/bin/qemu-system-x86_64 .local/tools/qemu/qemu-system-x86_64.exe
USER 1000
RUN python deploy/hf/prepare_image.py
ENV HOME=/home/user PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
EXPOSE 7860
CMD ["uvicorn", "deploy.hf.app:create_app", "--factory", "--host", "0.0.0.0", "--port", "7860", "--no-access-log"]
|