Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- Dockerfile +4 -6
- requirements.txt +28 -28
Dockerfile
CHANGED
@@ -5,27 +5,25 @@
|
|
5 |
# COPY . /code
|
6 |
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
7 |
# Utiliser une image Python officielle
|
|
|
8 |
FROM python:3.9-slim
|
9 |
|
10 |
# Installer les dépendances système nécessaires
|
11 |
RUN apt-get update && apt-get install -y \
|
12 |
ffmpeg \
|
|
|
|
|
|
|
13 |
&& rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
-
# Définir le répertoire de travail
|
16 |
WORKDIR /code
|
17 |
|
18 |
-
# Copier les fichiers de dépendances
|
19 |
COPY requirements.txt .
|
20 |
|
21 |
-
# Installer les dépendances Python
|
22 |
RUN pip install --no-cache-dir -r requirements.txt
|
23 |
|
24 |
-
# Copier le reste du code
|
25 |
COPY . .
|
26 |
|
27 |
-
# Exposer le port
|
28 |
EXPOSE 7860
|
29 |
|
30 |
-
# Commande pour démarrer l'application
|
31 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
5 |
# COPY . /code
|
6 |
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
7 |
# Utiliser une image Python officielle
|
8 |
+
|
9 |
FROM python:3.9-slim
|
10 |
|
11 |
# Installer les dépendances système nécessaires
|
12 |
RUN apt-get update && apt-get install -y \
|
13 |
ffmpeg \
|
14 |
+
libsm6 \
|
15 |
+
libxext6 \
|
16 |
+
libgl1-mesa-glx \
|
17 |
&& rm -rf /var/lib/apt/lists/*
|
18 |
|
|
|
19 |
WORKDIR /code
|
20 |
|
|
|
21 |
COPY requirements.txt .
|
22 |
|
|
|
23 |
RUN pip install --no-cache-dir -r requirements.txt
|
24 |
|
|
|
25 |
COPY . .
|
26 |
|
|
|
27 |
EXPOSE 7860
|
28 |
|
|
|
29 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
-
fastapi
|
2 |
-
uvicorn
|
3 |
-
python-multipart
|
4 |
-
firebase-admin
|
5 |
-
python-dotenv
|
6 |
-
huggingface-hub
|
7 |
-
yt-dlp
|
8 |
-
ffmpeg-python
|
9 |
-
pydantic
|
10 |
-
pydantic-settings
|
11 |
-
scenedetect==0.6.4
|
12 |
-
opencv-python==4.10.0.84
|
13 |
-
torch
|
14 |
-
torchvision
|
15 |
-
transformers
|
16 |
-
pillow
|
17 |
-
beautifulsoup4
|
18 |
-
requests
|
19 |
-
moviepy
|
20 |
-
|
21 |
-
# fastapi==0.110.0
|
22 |
-
# uvicorn==0.27.1
|
23 |
-
# python-multipart==0.0.9
|
24 |
-
# firebase-admin==6.4.0
|
25 |
-
# python-dotenv==1.0.1
|
26 |
-
# huggingface-hub==0.21.4
|
27 |
-
# yt-dlp==2024.3.10
|
28 |
-
# ffmpeg-python==0.2.0
|
29 |
# pydantic==2.6.3
|
|
|
1 |
+
fastapi
|
2 |
+
uvicorn
|
3 |
+
python-multipart
|
4 |
+
firebase-admin
|
5 |
+
python-dotenv
|
6 |
+
huggingface-hub
|
7 |
+
yt-dlp
|
8 |
+
ffmpeg-python
|
9 |
+
pydantic
|
10 |
+
pydantic-settings
|
11 |
+
scenedetect==0.6.4
|
12 |
+
opencv-python==4.10.0.84
|
13 |
+
torch
|
14 |
+
torchvision
|
15 |
+
transformers
|
16 |
+
pillow
|
17 |
+
beautifulsoup4
|
18 |
+
requests
|
19 |
+
moviepy==1.0.3
|
20 |
+
|
21 |
+
# fastapi==0.110.0
|
22 |
+
# uvicorn==0.27.1
|
23 |
+
# python-multipart==0.0.9
|
24 |
+
# firebase-admin==6.4.0
|
25 |
+
# python-dotenv==1.0.1
|
26 |
+
# huggingface-hub==0.21.4
|
27 |
+
# yt-dlp==2024.3.10
|
28 |
+
# ffmpeg-python==0.2.0
|
29 |
# pydantic==2.6.3
|