CoolFace
Apppublic

Abd756/StemSense

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
Dockerfile33 linesDownload Raw Back to root
1# 1. Use an official Python runtime with a good base2FROM python:3.10-slim3 4# 2. Install system dependencies (ESSENTIAL for audio)5RUN apt-get update && apt-get install -y \6    ffmpeg \7    git \8    && rm -rf /var/lib/apt/lists/*9 10# 3. Create a working directory and a non-root user (Required by HF)11RUN useradd -m -u 1000 user12USER user13ENV HOME=/home/user \14    PATH=/home/user/.local/bin:$PATH15 16WORKDIR $HOME/app17 18# 4. Copy requirements and install19COPY --chown=user requirements.txt .20RUN pip install --no-cache-dir --upgrade -r requirements.txt21 22# 5. Copy the rest of your application23COPY --chown=user . .24 25# 6. Create necessary data directories with permissions26RUN mkdir -p data/downloads data/stems data/exports27 28# 7. Expose the port FastAPI runs on29EXPOSE 786030 31# 8. Start the FastAPI server32# Note: HF Spaces uses port 7860 by default33CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]