Spaces:
Sleeping
Sleeping
FROM python:3.9-slim | |
RUN apt-get update && apt-get install -y \ | |
gcc \ | |
python3-dev \ | |
curl \ | |
gnupg \ | |
libxml2-dev \ | |
libxslt-dev \ | |
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \ | |
&& apt-get install -y nodejs \ | |
&& npm install -g playwright \ | |
&& playwright install-deps chromium \ | |
&& playwright install chromium | |
WORKDIR /app | |
RUN mkdir -p templates && \ | |
curl -L https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/edge_tts-api.py -o api.py && \ | |
curl -L https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/edge-tts-requirements.txt -o requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
RUN pip install flask | |
ENV PLAYWRIGHT_BROWSERS_PATH=/home/user/.cache/ms-playwright \ | |
PYTHONUNBUFFERED=1 | |
EXPOSE 7860 | |
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "300"] |