Spaces:
Running
Running
FROM python:3.9-slim | |
WORKDIR /app | |
# Install system dependencies | |
RUN apt-get update && apt-get install -y \ | |
wget \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Download the code and requirements from Hugging Face | |
RUN wget -O api.py "https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/etts-api-updated.py" \ | |
&& wget -O requirements.txt "https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/erequirements.txt" | |
# Install Python dependencies | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Create audio_files directory and set permissions | |
RUN mkdir -p /app/audio_files && chmod -R 777 /app/audio_files | |
EXPOSE 7860 | |
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"] |