Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -16
Dockerfile
CHANGED
|
@@ -2,32 +2,21 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
libsndfile1 \
|
| 8 |
-
build-essential \
|
| 9 |
-
pkg-config \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 14 |
-
|
| 15 |
-
# 3. Pré-installation Numpy
|
| 16 |
-
RUN pip install --no-cache-dir "numpy<2.0.0"
|
| 17 |
-
|
| 18 |
-
# 4. Installation des dépendances "propres"
|
| 19 |
COPY requirements.txt .
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
RUN pip install --no-cache-dir --no-deps chatterbox-tts
|
| 24 |
-
|
| 25 |
-
# 6. Copie du code
|
| 26 |
COPY app.py .
|
| 27 |
|
| 28 |
-
#
|
| 29 |
ENV HF_HOME=/app/cache
|
| 30 |
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
| 31 |
|
| 32 |
-
#
|
| 33 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Installation des dépendances système (Audio)
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
libsndfile1 \
|
|
|
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
+
# Installation des dépendances Python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
+
# Copie du code
|
|
|
|
|
|
|
|
|
|
| 15 |
COPY app.py .
|
| 16 |
|
| 17 |
+
# Création du dossier cache Hugging Face avec permissions larges
|
| 18 |
ENV HF_HOME=/app/cache
|
| 19 |
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
| 20 |
|
| 21 |
+
# Lancement
|
| 22 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|