Spaces:
Sleeping
Sleeping
| FROM python:3.10.14 | |
| # Install dependencies | |
| RUN apt-get update && apt-get install -y libsndfile1 espeak-ng | |
| # Set the working directory | |
| WORKDIR /app | |
| # Устанавливаем зависимости | |
| 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 | |
| ENV STANZA_RESOURCES_DIR=/app/stanza_resources | |
| ENV MODEL_DIR=/app/model | |
| # Create necessary directories and set permissions | |
| RUN mkdir -p /app/.cache /app/stanza_resources /app/model && \ | |
| chmod -R 777 /app/.cache /app/stanza_resources /app/model | |
| # Expose the port | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["python", "app.py"] | |