Spaces:
Running
Running
File size: 838 Bytes
d7013e6 | 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 | FROM python:3.11-slim
WORKDIR /app
# System deps for audio decoding
RUN apt-get update && apt-get install -y --no-install-recommends \
libsndfile1 ffmpeg git \
&& rm -rf /var/lib/apt/lists/*
# Python deps — CPU-only torch (smaller image, faster build)
RUN pip install --no-cache-dir torch torchaudio --index-url https://download.pytorch.org/whl/cpu
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir 'datasets<4' librosa soundfile huggingface_hub
# Copy project
COPY src/ src/
COPY app.py .
COPY recipes.yaml .
# Cache 1750h recipe and upload to HF Dataset repo
# HF_TOKEN must be set as a Space secret for upload
CMD ["python", "-u", "app.py", "cache", \
"--recipe", "1750h", \
"--cache-dir", "mel_cache", \
"--repo", "tisaconundrum/grassmann-mel-cache"]
|