Update Dockerfile
Browse files- Dockerfile +18 -8
Dockerfile
CHANGED
|
@@ -1,12 +1,22 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
| 4 |
WORKDIR /code
|
| 5 |
-
COPY requirements.txt .
|
| 6 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
EXPOSE 7860
|
| 11 |
-
|
| 12 |
-
CMD ["uvicorn","app:app","--host","0.0.0.0","--port","7860"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
| 4 |
+
PYTHONUNBUFFERED=1 \
|
| 5 |
+
FILES_DIR=/tmp/brain_app/files \
|
| 6 |
+
TTS_WS_TARGET=wss://Percy3822-ActualTTS.hf.space/ws/tts \
|
| 7 |
+
TTS_HTTP_TARGET=https://Percy3822-ActualTTS.hf.space/speak \
|
| 8 |
+
STT_WS_TARGET=wss://Percy3822-ActualSTT.hf.space/ws/stt
|
| 9 |
+
|
| 10 |
+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && \
|
| 11 |
rm -rf /var/lib/apt/lists/*
|
| 12 |
+
|
| 13 |
+
RUN mkdir -p ${FILES_DIR}
|
| 14 |
+
|
| 15 |
WORKDIR /code
|
| 16 |
+
COPY requirements.txt /code/requirements.txt
|
| 17 |
+
RUN pip install --no-cache-dir -r /code/requirements.txt
|
| 18 |
+
|
| 19 |
+
COPY app.py /code/app.py
|
| 20 |
+
|
| 21 |
EXPOSE 7860
|
| 22 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|