Spaces:
Sleeping
Sleeping
File size: 918 Bytes
8314611 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
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"] |