alexorlov commited on
Commit
fd175c4
·
verified ·
1 Parent(s): 9e44cc2

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -8
Dockerfile CHANGED
@@ -2,25 +2,19 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies (ffmpeg REQUIRED for audio conversion!)
6
  RUN apt-get update && apt-get install -y \
7
  ffmpeg \
8
  libsndfile1 \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Force rebuild: v2 - fix JSON parsing
12
- COPY requirements.txt .
13
-
14
- # Install Python dependencies
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Pre-download Whisper model during build (faster startup)
18
  RUN python -c "from transformers import pipeline; pipeline('automatic-speech-recognition', model='openai/whisper-small')"
19
 
20
- # Copy application code
21
  COPY ./app /app/app
22
 
23
- # HuggingFace Spaces uses port 7860
24
  EXPOSE 7860
25
 
26
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  ffmpeg \
7
  libsndfile1 \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
+ COPY requirements.docker.txt requirements.txt
 
 
 
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Pre-download Whisper model
14
  RUN python -c "from transformers import pipeline; pipeline('automatic-speech-recognition', model='openai/whisper-small')"
15
 
 
16
  COPY ./app /app/app
17
 
 
18
  EXPOSE 7860
19
 
20
  CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]