Delete Dockerfile
Browse files- Dockerfile +0 -38
Dockerfile
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
# Use a lightweight Python 3.11 base image
|
| 2 |
-
FROM python:3.11-slim
|
| 3 |
-
|
| 4 |
-
# Set environment variables
|
| 5 |
-
ENV PYTHONUNBUFFERED=1 \
|
| 6 |
-
PYTHONDONTWRITEBYTECODE=1 \
|
| 7 |
-
HF_HOME=/tmp/hf_home \
|
| 8 |
-
DEBIAN_FRONTEND=noninteractive
|
| 9 |
-
|
| 10 |
-
# Install system dependencies (ffmpeg is required by FunASR/torchaudio for webm/ogg audio decoding)
|
| 11 |
-
RUN apt-get update && \
|
| 12 |
-
apt-get install -y --no-install-recommends ffmpeg && \
|
| 13 |
-
rm -rf /var/lib/apt/lists/*
|
| 14 |
-
|
| 15 |
-
# Create a non-root user (Hugging Face requirement)
|
| 16 |
-
RUN useradd -m -u 1000 user
|
| 17 |
-
USER user
|
| 18 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 19 |
-
|
| 20 |
-
# Set working directory
|
| 21 |
-
WORKDIR /app
|
| 22 |
-
|
| 23 |
-
# Install dependencies first (to leverage Docker caching)
|
| 24 |
-
COPY --chown=user:user Requirements.txt /app/
|
| 25 |
-
RUN pip install --no-cache-dir --upgrade pip && \
|
| 26 |
-
pip install --no-cache-dir -r Requirements.txt
|
| 27 |
-
|
| 28 |
-
# Copy the rest of the application code
|
| 29 |
-
COPY --chown=user:user . /app/
|
| 30 |
-
|
| 31 |
-
# Expose port 7860 (Hugging Face requirement)
|
| 32 |
-
EXPOSE 7860
|
| 33 |
-
|
| 34 |
-
# Start the FastAPI application with 2 workers.
|
| 35 |
-
# Each worker loads ~1.5GB of ML models (SenseVoice + BERT + VAD).
|
| 36 |
-
# With 16GB RAM this is safe (~3GB total), and 2 workers provides real
|
| 37 |
-
# concurrency benefit for CPU-bound STT when multiple users transcribe simultaneously.
|
| 38 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--timeout-keep-alive", "75"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|