Spaces:
Running on Zero
Running on Zero
File size: 688 Bytes
d443689 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | FROM python:3.12-slim-bookworm
# The host must inject NVIDIA graphics driver libraries at container creation.
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,graphics \
PYTHONUNBUFFERED=1 \
RENDER_BACKEND=gpu \
BLENDER_THREADS=4 \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_SERVER_PORT=7860
WORKDIR /app
COPY packages.txt requirements.txt ./
RUN apt-get update && xargs -r apt-get install -y --no-install-recommends < packages.txt \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir -r requirements.txt \
&& useradd -m -u 1000 render
COPY --chown=render:render . /app
RUN chown -R render:render /app
USER render
EXPOSE 7860
CMD ["python", "app.py"]
|