Update Dockerfile
Browse files- 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
|
| 34 |
-
COPY
|
| 35 |
-
RUN pip install --no-cache-dir -r
|
| 36 |
|
| 37 |
-
# Install
|
| 38 |
-
# - Voxtral requires mistral-common[audio]
|
| 39 |
-
# - soundfile for audio I/O
|
| 40 |
RUN pip install --no-cache-dir \
|
| 41 |
-
"
|
| 42 |
-
soundfile
|
| 43 |
|
| 44 |
-
#
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
# Default working directory for running
|
| 49 |
-
WORKDIR /app/
|
| 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. `
|
| 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"]
|