Download Dockerfile from multija/locutor: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/multija/locutor/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/multija/locutor/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/multija/locutor/resolve/main/Dockerfile
1.05 kB
| FROM python:3.10-slim | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| # Instala requisitos do sistema | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git wget ffmpeg build-essential ca-certificates libsndfile1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Atualiza pip | |
| RUN python -m pip install --upgrade pip setuptools wheel | |
| # Cria os diretórios de runtime e garante permissão (fixa no build) | |
| RUN mkdir -p /app/model /app/config /app/vocab /app/output \ | |
| && chmod -R a+rwx /app/model /app/config /app/vocab /app/output | |
| # (opcional) criar usuário não-root e tornar /app propriedade dele | |
| RUN useradd -m -u 1000 appuser || true \ | |
| && chown -R appuser:appuser /app | |
| # Instala libs Python necessárias (ajuste sua lista se necessário) | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir -r /app/requirements.txt | |
| # Copia aplicação | |
| COPY app.py /app/app.py | |
| # muda para usuário não-root (melhor para produção) | |
| USER appuser | |
| EXPOSE 8000 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |