Update Dockerfile
Browse files- Dockerfile +16 -2
Dockerfile
CHANGED
|
@@ -1,8 +1,22 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
WORKDIR /code
|
|
|
|
| 4 |
COPY requirements.txt .
|
| 5 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 6 |
COPY . .
|
|
|
|
| 7 |
EXPOSE 7860
|
| 8 |
-
CMD ["uvicorn",
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# System deps: ffmpeg is REQUIRED for audio decoding
|
| 4 |
+
RUN apt-get update && apt-get install -y ffmpeg curl ca-certificates && rm -rf /var/lib/apt/lists/*
|
| 5 |
+
|
| 6 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
| 7 |
+
PYTHONDONTWRITEBYTECODE=1 \
|
| 8 |
+
PYTHONUNBUFFERED=1 \
|
| 9 |
+
HF_HOME=/root/.cache/huggingface \
|
| 10 |
+
TRANSFORMERS_CACHE=/root/.cache/huggingface \
|
| 11 |
+
FASTER_WHISPER_MODEL=tiny.en \
|
| 12 |
+
NUM_THREADS=2
|
| 13 |
+
|
| 14 |
WORKDIR /code
|
| 15 |
+
|
| 16 |
COPY requirements.txt .
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
+
|
| 19 |
COPY . .
|
| 20 |
+
|
| 21 |
EXPOSE 7860
|
| 22 |
+
CMD ["uvicorn","app:app","--host","0.0.0.0","--port","7860"]
|