Spaces:
Running on Zero
Running on Zero
File size: 920 Bytes
ae16715 689f4c9 f6b07b4 689f4c9 45113e6 689f4c9 45113e6 689f4c9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # NOTE: This Dockerfile is for LOCAL Docker usage only.
# On HuggingFace Spaces, the Space uses sdk=gradio with ZeroGPU
# (see spaces/README.md) — this Dockerfile is NOT used there.
FROM python:3.11-slim
# System deps for audio/image processing that gradio may need
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg libsndfile1 git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python deps first (cache layer)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project
COPY . .
# Install the package itself (for obliteratus imports)
RUN pip install --no-cache-dir .
# Run as non-root user for security
RUN useradd -m appuser
USER appuser
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/')" || exit 1
CMD ["python", "app.py"]
|