File size: 1,226 Bytes
c46fdf9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | FROM python:3.10-slim
WORKDIR /app
# 1. Install system dependencies required for audio processing and C-compilation
RUN apt-get update && apt-get install -y \
git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1 build-essential curl \
&& rm -rf /var/lib/apt/lists/*
# 2. Upgrade pip and install core build tools globally
RUN pip install --no-cache-dir pip -U
RUN pip install --no-cache-dir Cython wheel setuptools
# 3. FORCE youtokentome to build without isolation so it can see Cython
RUN pip install --no-cache-dir --no-build-isolation youtokentome
# 4. Install PyTorch (CPU version by default to keep container size manageable,
# change to CUDA if you have GPU hardware enabled in your Space)
RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# 5. Install NeMo 1.23.0 (This version avoids the OmegaConf dict/list mismatch)
RUN pip install --no-cache-dir nemo_toolkit[asr]==1.23.0
# 6. Install App Dependencies
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# 7. Copy your app code into the container
COPY . /app/
# 8. Expose the port Gradio runs on
EXPOSE 7860
# 9. Start the application
CMD ["python", "app.py"] |