Spaces:
Sleeping
Sleeping
Download Dockerfile from Dhrumilo7/echoguard-api: direct link, hf CLI and curl.
- Browser
- Download file 705 Bytes
-
https://huggingface.co/spaces/Dhrumilo7/echoguard-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Dhrumilo7/echoguard-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Dhrumilo7/echoguard-api/resolve/main/Dockerfile
705 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| ffmpeg \ | |
| libsndfile1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create a non-root user for Hugging Face Spaces security | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy application code | |
| COPY --chown=user . $HOME/app | |
| # Expose port (Hugging Face Spaces default is 7860) | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |