Spaces:
Paused
Paused
| FROM python:3.9-slim | |
| # System deps | |
| RUN apt-get update && apt-get install -y ffmpeg git && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app/chatbot | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create writable directories | |
| RUN mkdir -p /data/hf_cache /data/transformers_cache /data/nltk_data /static/audio | |
| RUN chmod -R 777 /static/audio | |
| # Set environment variables | |
| ENV HF_HOME=/data/hf_cache | |
| ENV TRANSFORMERS_CACHE=/data/transformers_cache | |
| ENV NLTK_DATA=/data/nltk_data | |
| ENV AUDIO_FOLDER=/data/audio | |
| # Copy source | |
| COPY . . | |
| EXPOSE 5000 | |
| # Run via a production WSGI server (you can also use gunicorn or waitress) | |
| CMD ["waitress-serve", "--listen=0.0.0.0:5000", "app:app"] |