Percy3822 commited on
Commit
06dd823
·
verified ·
1 Parent(s): 004c109

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -5
Dockerfile CHANGED
@@ -1,21 +1,28 @@
1
  FROM python:3.10-slim
2
 
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
4
- ca-certificates curl && \
5
  rm -rf /var/lib/apt/lists/*
6
 
7
  WORKDIR /code
 
 
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- # Create writable dirs for files and voices
12
- RUN mkdir -p /tmp/brain_app/files /home/user/voices
13
 
 
14
  COPY app.py .
15
 
16
- ENV BASE_DIR=/tmp/brain_app
17
  ENV VOICE_DIR=/home/user/voices
18
- ENV DEFAULT_VOICE=en_US-lessac-high
 
 
 
19
 
20
  EXPOSE 7860
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Basic deps
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ ca-certificates curl procps && \
6
  rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /code
9
+
10
+ # Install Python deps
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Writable dirs
15
+ RUN mkdir -p /home/user/voices /tmp/tts_app/files
16
 
17
+ # App
18
  COPY app.py .
19
 
20
+ # ENV
21
  ENV VOICE_DIR=/home/user/voices
22
+ ENV DEFAULT_VOICE=en_US-libritts-high
23
+ ENV FILES_DIR=/tmp/tts_app/files
24
+ ENV PIPER_BIN=piper
25
+ ENV OMP_NUM_THREADS=1
26
 
27
  EXPOSE 7860
28
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]