Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +22 -6
Dockerfile
CHANGED
|
@@ -9,27 +9,43 @@ ENV PYTHONUNBUFFERED=1
|
|
| 9 |
RUN useradd -m -u 1000 user
|
| 10 |
WORKDIR /home/user/app
|
| 11 |
|
| 12 |
-
# Installer les dépendances système
|
| 13 |
RUN apt-get update && apt-get install -y \
|
| 14 |
ffmpeg \
|
| 15 |
libsndfile1 \
|
| 16 |
cmake \
|
| 17 |
g++ \
|
| 18 |
git \
|
|
|
|
| 19 |
&& rm -rf /var/lib/apt/lists/*
|
| 20 |
|
| 21 |
-
#
|
| 22 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 23 |
-
pip install --no-cache-dir
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
# Copier
|
| 26 |
COPY --chown=user requirements.txt .
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
# Copier le reste du code
|
| 30 |
COPY --chown=user . .
|
| 31 |
|
| 32 |
-
# Donner les permissions d'écriture
|
| 33 |
RUN chmod 777 /home/user/app
|
| 34 |
|
| 35 |
USER user
|
|
|
|
| 9 |
RUN useradd -m -u 1000 user
|
| 10 |
WORKDIR /home/user/app
|
| 11 |
|
| 12 |
+
# Installer les dépendances système
|
| 13 |
RUN apt-get update && apt-get install -y \
|
| 14 |
ffmpeg \
|
| 15 |
libsndfile1 \
|
| 16 |
cmake \
|
| 17 |
g++ \
|
| 18 |
git \
|
| 19 |
+
build-essential \
|
| 20 |
&& rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
+
# Mettre à jour pip et installer les outils de build
|
| 23 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 24 |
+
pip install --no-cache-dir \
|
| 25 |
+
Cython==3.0.0 \
|
| 26 |
+
packaging \
|
| 27 |
+
setuptools==69.0.0 \
|
| 28 |
+
wheel
|
| 29 |
|
| 30 |
+
# Copier le fichier requirements.txt
|
| 31 |
COPY --chown=user requirements.txt .
|
| 32 |
+
|
| 33 |
+
# Installation par étapes pour mieux gérer les erreurs
|
| 34 |
+
RUN pip install --no-cache-dir numpy==1.23.5 && \
|
| 35 |
+
pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \
|
| 36 |
+
pip install --no-cache-dir huggingface_hub && \
|
| 37 |
+
# Essayer d'installer youtokentome séparément
|
| 38 |
+
pip install --no-cache-dir youtokentome || echo "⚠️ youtokentome failed - will try with remaining packages"
|
| 39 |
+
|
| 40 |
+
# Installer le reste des dépendances
|
| 41 |
+
RUN pip install --no-cache-dir -r requirements.txt || \
|
| 42 |
+
(echo "⚠️ Some packages failed, trying to continue..." && \
|
| 43 |
+
pip install --no-cache-dir nemo_toolkit[asr] gradio psutil humanize)
|
| 44 |
|
| 45 |
# Copier le reste du code
|
| 46 |
COPY --chown=user . .
|
| 47 |
|
| 48 |
+
# Donner les permissions d'écriture
|
| 49 |
RUN chmod 777 /home/user/app
|
| 50 |
|
| 51 |
USER user
|