Percy3822 commited on
Commit
9e77fef
·
verified ·
1 Parent(s): eee6a84

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -17
Dockerfile CHANGED
@@ -1,24 +1,21 @@
1
- # Minimal, stable base
2
  FROM python:3.10-slim
3
 
4
- # Avoid interactive tz prompt
5
- ENV DEBIAN_FRONTEND=noninteractive
6
-
7
- # System TTS tool & helpers
8
- RUN apt-get update && \
9
- apt-get install -y --no-install-recommends \
10
- espeak-ng sox curl ca-certificates && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
- # Python deps
14
- COPY requirements.txt /tmp/requirements.txt
15
- RUN pip install --no-cache-dir -r /tmp/requirements.txt
16
-
17
- # App
18
  WORKDIR /code
19
- COPY app.py /code/app.py
20
- COPY README.md /code/README.md
 
 
 
 
 
 
 
 
 
21
 
22
- # Hugging Face Spaces expects port 7860
23
- ENV PORT=7860
24
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
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"]