mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-09-21 08:50:42 +02:00
Exact setuptools/wheel pins block platform-specific backend patches and make isolated pip installs fail on Android/Termux Python. Keep a setuptools lower bound only, drop the unused wheel backend pin, keep requirements.txt aligned with core package deps, and install the Spaces extra in Docker instead of pulling bitsandbytes by default. Android/Termux is still not a supported runtime; the new platform note documents host wheels, ANDROID_API_LEVEL, and --no-build-isolation so pip does not isolate a second setuptools or compile manylinux-only extensions.
35 lines
1.1 KiB
Docker
35 lines
1.1 KiB
Docker
# 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). requirements.txt is the core
|
|
# package graph; the Spaces extra adds Gradio for app.py without pulling
|
|
# the quantization extra.
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy project
|
|
COPY . .
|
|
|
|
# Install the package itself (for obliteratus imports) plus the UI extra.
|
|
RUN pip install --no-cache-dir ".[spaces]"
|
|
|
|
# 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"]
|