File size: 998 Bytes
3a2cb1d
f40f952
3a2cb1d
 
 
f40f952
 
 
 
 
3a2cb1d
 
f40f952
 
 
3a2cb1d
f40f952
 
 
 
 
 
 
 
 
3a2cb1d
 
 
f40f952
 
 
3a2cb1d
 
 
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
# Dockerfile — Cortex-0 (Phase 12)
#
# Image de l'API FastAPI + de la démo Gradio. Contrainte du cahier des charges :
# AUCUN poids pré-entraîné n'est téléchargé dans l'image. Seuls nos propres
# checkpoints (facultatifs, via CORTEX_CHECKPOINT monté au runtime) sont chargés.

FROM python:3.11-slim

ENV PYTHONUNBUFFERED=1 \
    PYTHONDONTWRITEBYTECODE=1 \
    PIP_NO_CACHE_DIR=1 \
    PORT=8000

WORKDIR /app

# Dépendances système minimales (I/O audio éventuelle).
RUN apt-get update \
    && apt-get install -y --no-install-recommends libsndfile1 ffmpeg \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt

COPY . .

# HF_TOKEN / CORTEX_CHECKPOINT fournis à l'exécution, jamais cuits dans l'image.
ENV HF_TOKEN="" \
    CORTEX_CHECKPOINT=""

EXPOSE 8000 7860

# Par défaut : l'API FastAPI. Pour la démo Gradio :
#   docker run -p 7860:7860 ... python app/gradio_app.py
CMD ["python", "-m", "src.api"]