Spaces:
Running
Running
Echo-ai
commited on
Create Dockerfile
Browse files- Dockerfile +31 -0
Dockerfile
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9-slim
|
2 |
+
RUN apt-get update && apt-get install -y \
|
3 |
+
gcc \
|
4 |
+
python3-dev \
|
5 |
+
curl \
|
6 |
+
gnupg \
|
7 |
+
libxml2-dev \
|
8 |
+
libxslt-dev \
|
9 |
+
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
|
10 |
+
&& apt-get install -y nodejs \
|
11 |
+
&& npm install -g playwright \
|
12 |
+
&& playwright install-deps chromium \
|
13 |
+
&& playwright install chromium
|
14 |
+
|
15 |
+
WORKDIR /app
|
16 |
+
|
17 |
+
RUN mkdir -p templates && \
|
18 |
+
curl -L https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/edge_tts-api.py -o api.py && \
|
19 |
+
curl -L https://huggingface.co/datasets/gefiwek187/realtime-api/resolve/main/edge-tts-requirements.txt -o requirements.txt
|
20 |
+
|
21 |
+
|
22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
+
RUN pip install flask
|
24 |
+
|
25 |
+
|
26 |
+
ENV PLAYWRIGHT_BROWSERS_PATH=/home/user/.cache/ms-playwright \
|
27 |
+
PYTHONUNBUFFERED=1
|
28 |
+
|
29 |
+
EXPOSE 7860
|
30 |
+
|
31 |
+
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "300"]
|