confereai-dev / Dockerfile
TEDDyx86's picture
Fix: Add robust error handling and frontend ERROR state
89dd351
raw
history blame contribute delete
712 Bytes
FROM python:3.10-slim
# Instala dependências do sistema
RUN apt-get update && apt-get install -y \
libsndfile1 \
ffmpeg \
unrar-free \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Instalação do PyTorch explícita e otimizada primeiro
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
# Copia arquivos de requisitos e instala
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copia o resto do código
COPY . .
# Garante que a pasta .tmp existe e tem permissão
RUN mkdir -p .tmp && chmod 777 .tmp
# Porta padrão do Hugging Face Spaces
ENV PORT=7860
EXPOSE 7860
# Comando para iniciar o servidor
CMD ["python", "main.py"]