FROM python:3.10.14 # Install dependencies RUN apt-get update && apt-get install -y libsndfile1 espeak-ng # Set the working directory WORKDIR /app # Create cache directory with write permissions RUN mkdir -p /app/.cache && chmod 777 /app/.cache # Устанавливаем зависимости COPY requirements.txt /app/requirements.txt RUN apt-get update && apt-get install -y git ffmpeg && \ pip install --no-cache-dir -r /app/requirements.txt # Copy the application code COPY . . # Set environment variable for Hugging Face cache directory ENV HF_HOME=/app/.cache # Create cache directory and set permissions RUN mkdir -p /app/cache && chmod -R 777 /app/cache # Expose the port EXPOSE 7860 # Run the application CMD ["python", "app.py"]