Spaces:
Runtime error
Runtime error
Download Dockerfile from Philosia-codecult/Signify: direct link, hf CLI and curl.
- Browser
- Download file 977 Bytes
-
https://huggingface.co/spaces/Philosia-codecult/Signify/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Philosia-codecult/Signify/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Philosia-codecult/Signify/resolve/main/Dockerfile
977 Bytes
| FROM python:3.10-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 | |
| WORKDIR /app | |
| # Install minimal build tools (some packages require compilation) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| build-essential \ | |
| gcc \ | |
| ca-certificates \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python deps (cache layer) | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip setuptools wheel && pip install -r requirements.txt | |
| # Create a non-root user and set ownership | |
| RUN useradd -m appuser && mkdir -p /app | |
| USER appuser | |
| # Copy application code | |
| COPY --chown=appuser:appuser . . | |
| # Hugging Face Spaces expects the web process to listen on the provided PORT (defaults to 7860) | |
| EXPOSE 7860 | |
| # Use PORT env if set by Spaces, default to 7860; include proxy headers for correct client IPs | |
| CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860} --proxy-headers"] | |