initial
This commit is contained in:
28
Dockerfile
Normal file
28
Dockerfile
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM python:3.11-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt /app/requirements.txt
|
||||
RUN pip install --no-cache-dir -r /app/requirements.txt
|
||||
|
||||
COPY app /app/app
|
||||
|
||||
ENV MODEL_DIR=/models
|
||||
ENV MODEL_NAME=whisper-base-onnx
|
||||
ENV ENCODER_MODEL_PATH=/models/whisper_encoder_base_20s.onnx
|
||||
ENV DECODER_MODEL_PATH=/models/whisper_decoder_base_20s.onnx
|
||||
ENV MEL_FILTERS_PATH=/models/mel_80_filters.txt
|
||||
ENV VOCAB_EN_PATH=/models/vocab_en.txt
|
||||
ENV VOCAB_ZH_PATH=/models/vocab_zh.txt
|
||||
ENV STT_API_KEY=
|
||||
|
||||
EXPOSE 9000
|
||||
|
||||
CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "9000"]
|
||||
Reference in New Issue
Block a user