bezzam HF Staff commited on
Commit
272d144
·
verified ·
1 Parent(s): 83c4648

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -14
Dockerfile CHANGED
@@ -30,28 +30,36 @@ RUN pip install --no-cache-dir \
30
  torchcodec==0.6.0 \
31
  --index-url https://download.pytorch.org/whl/cu128
32
 
33
- # Copy and install transformers-specific requirements (torch already installed above, pip will skip it)
34
- COPY transformers/requirements.txt /app/transformers/requirements.txt
35
- RUN pip install --no-cache-dir -r transformers/requirements.txt
36
 
37
- # Install additional dependencies for specific model families
38
- # - Voxtral requires mistral-common[audio]
39
- # - soundfile for audio I/O
40
  RUN pip install --no-cache-dir \
41
- "mistral-common[audio]>=1.9.0" \
42
- soundfile
43
 
44
- # Copy only the required files
45
- COPY transformers/ /app/transformers/
46
- COPY normalizer/ /app/normalizer/
 
 
 
 
 
 
 
 
 
 
 
47
 
48
- # Default working directory for running transformers scripts
49
- WORKDIR /app/transformers
50
 
51
  # Default entrypoint
52
  ENTRYPOINT ["bash"]
53
 
54
  # Keep-alive CMD so the Space runtime stays healthy. HF Jobs and `docker run`
55
- # override this with their own command (e.g. `run_cohere.sh`).
56
  EXPOSE 7860
57
  CMD ["-c", "python3 -m http.server 7860"]
 
30
  torchcodec==0.6.0 \
31
  --index-url https://download.pytorch.org/whl/cu128
32
 
33
+ # Copy and install common requirements (torch already installed above, pip will skip it)
34
+ COPY requirements/requirements.txt /app/requirements/requirements.txt
35
+ RUN pip install --no-cache-dir -r requirements/requirements.txt
36
 
37
+ # Install NeMo toolkit with ASR extras
 
 
38
  RUN pip install --no-cache-dir \
39
+ "nemo_toolkit[asr]==2.7.2"
 
40
 
41
+ # Install SALM dependencies (lhotse for audio loading, transformers for GenerationConfig)
42
+ RUN pip install --no-cache-dir \
43
+ lhotse \
44
+ sentencepiece
45
+
46
+ # CUDA-accelerated TDT and RNN-T decoding
47
+ RUN pip install --no-cache-dir \
48
+ "cuda-python>=12.4"
49
+
50
+ # Force soundfile backend for datasets audio decoding (avoids torchcodec/FFmpeg issues)
51
+ ENV HF_AUDIO_DECODER_BACKEND=soundfile
52
+
53
+ # Copy the full repository
54
+ COPY . /app
55
 
56
+ # Default working directory for running nemo scripts
57
+ WORKDIR /app/nemo_asr
58
 
59
  # Default entrypoint
60
  ENTRYPOINT ["bash"]
61
 
62
  # Keep-alive CMD so the Space runtime stays healthy. HF Jobs and `docker run`
63
+ # override this with their own command (e.g. `run_parakeet.sh`).
64
  EXPOSE 7860
65
  CMD ["-c", "python3 -m http.server 7860"]