Percy3822 commited on
Commit
c863f5b
·
verified ·
1 Parent(s): be0c9e2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -8
Dockerfile CHANGED
@@ -1,12 +1,22 @@
1
  FROM python:3.10-slim
2
- RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tini && \
 
 
 
 
 
 
 
 
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
- COPY app.py .
8
- ENV BASE_DIR=/tmp/brain_app
9
- RUN mkdir -p /tmp/brain_app/files/logs && chmod -R 0777 /tmp/brain_app
10
  EXPOSE 7860
11
- ENTRYPOINT ["/usr/bin/tini","--"]
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"]