mia-audio-studio / Dockerfile.gpu
fjgarate
feat: autenticación Keycloak + nginx proxy para HF Spaces
d852670
raw
history blame contribute delete
884 Bytes
# --- Dockerfile (GPU, PyTorch opcional) ---
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends \ python3 python3-pip python3-venv build-essential curl git \ && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.api.txt ./
RUN pip install --no-cache-dir -r requirements.api.txt
COPY requirements.agents.txt ./
# Instala PyTorch compatible con CUDA 12.1 si lo necesitas; si no, comenta la línea
RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cu121 && \ pip install --no-cache-dir -r requirements.agents.txt
COPY app ./app
EXPOSE 8000
CMD ["python3", "-m", "uvicorn", "app.main:app", "--host","0.0.0.0","--port","8000"]