dev-mode-orpheus-tts / Dockerfile
Tomtom84's picture
Update Dockerfile
c700bd5 verified
raw
history blame
921 Bytes
# PyTorch + CUDA 12.1 + cuDNN 8 (passt zur L4)
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
# -- System-Pakete minimal, aber was wir wirklich brauchen --
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git-lfs build-essential portaudio19-dev ffmpeg && \
rm -rf /var/lib/apt/lists/*
# Non-root-User (Spaces-Empfehlung)
RUN useradd -m -u 1000 user
USER user
WORKDIR /app
ENV PATH="/home/user/.local/bin:$PATH"
# Python-Abhängigkeiten
COPY --chown=user requirements.txt .
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Orpheus-/SNAC-Code + Server
COPY --chown=user . /app
# GPU-freundliches Torch-Upgrade (falls gewünscht)
RUN pip install --no-cache-dir \
torch==2.3.1+cu121 torchaudio==2.3.1 \
--index-url https://download.pytorch.org/whl/cu121
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]